mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: DaeMyung Kang <charsyam@gmail.com>
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: Hyunchul Lee <hyc.lee@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	DaeMyung Kang <charsyam@gmail.com>
Subject: [PATCH v6 0/4] ntfs: finish resident attribute lookup validation
Date: Tue,  9 Jun 2026 00:49:13 +0900	[thread overview]
Message-ID: <20260608154917.2703739-1-charsyam@gmail.com> (raw)

Hi,

this is v6 of the remaining NTFS resident attribute lookup validation
fixes, rebased onto the current ntfs-next branch from git.kernel.org.

v5 was generated against the temporary linux-ntfs ntfs-next test branch,
where the earlier lookup validation patches and the initial resident
$INDEX_ROOT validator were already present. That made the final
allocated_size-only patch depend on context that is not present in the
official ntfs-next branch.

This version is generated on top of:

  git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/ntfs.git
  branch ntfs-next
  base: <b3f6cd1d54aa>

The current official ntfs-next branch already contains the earlier shared
attribute-value validator, the volume-name error handling fix, the volume
information search-context reinit fix, and the resident $VOLUME_NAME
validator. This resend therefore contains only the remaining official-base
delta:

- reject non-resident records for all resident-only attribute types;
- fix the $INDEX_ROOT grow and shrink ordering so header capacity never
  exceeds the resident value visible to lookup-time validation;
- add the full resident $INDEX_ROOT lookup validator, including
  allocated_size checks.

Changes since v5:
- Rebased onto the official git.kernel.org ntfs-next branch instead of
  the temporary out-of-tree test branch, so the series no longer depends
  on patches that only existed there.
- Patch 4 is now a complete resident $INDEX_ROOT validator. In v5 it was
  an incremental allocated_size-only change on top of the out-of-tree
  validator; the resulting validator function is unchanged, but it now
  stands on its own against ntfs-next.
- No functional changes to the other three patches.

Testing:
- Applied this 4-patch series on top of the ntfs-next base above with
  git am; git diff --check is clean and scripts/checkpatch.pl --strict
  passes on all four patches.
- Built a KASAN kernel (CONFIG_KASAN=y, CONFIG_NTFS_FS=y) and ran it
  under QEMU against fresh 512 MiB NTFS images: mounted each read-write,
  created 12 directories and 2160 files, then renamed, removed, cleaned
  up and unmounted. Repeated three times; no KASAN report, oops or
  panic, and ntfsfix -n reported each image clean after every run.

DaeMyung Kang (4):
  ntfs: reject non-resident records for resident-only attributes
  ntfs: grow index root value before reparent header update
  ntfs: update index root allocated size before shrink
  ntfs: validate resident index root values on lookup

 fs/ntfs/attrib.c | 49 +++++++++++++++++++++++-
 fs/ntfs/index.c  | 96 +++++++++++++++++++++++++++++++-----------------
 2 files changed, 111 insertions(+), 34 deletions(-)


base-commit: b3f6cd1d54aa279cc4f47aa27939ebe517a2c390
-- 
2.43.0

             reply	other threads:[~2026-06-08 15:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 15:49 DaeMyung Kang [this message]
2026-06-08 15:49 ` [PATCH v6 1/4] ntfs: reject non-resident records for resident-only attributes DaeMyung Kang
2026-06-08 23:56   ` Hyunchul Lee
2026-06-08 15:49 ` [PATCH v6 2/4] ntfs: grow index root value before reparent header update DaeMyung Kang
2026-06-08 23:56   ` Hyunchul Lee
2026-06-08 15:49 ` [PATCH v6 3/4] ntfs: update index root allocated size before shrink DaeMyung Kang
2026-06-08 23:57   ` Hyunchul Lee
2026-06-08 15:49 ` [PATCH v6 4/4] ntfs: validate resident index root values on lookup DaeMyung Kang
2026-06-08 23:58   ` Hyunchul Lee
2026-06-09  9:25 ` [PATCH v6 0/4] ntfs: finish resident attribute lookup validation Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260608154917.2703739-1-charsyam@gmail.com \
    --to=charsyam@gmail.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®