From: Hyunchul Lee <hyc.lee@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,
charsyam@gmail.com
Subject: [PATCH v2 0/4] ntfs: tighten EA and index metadata validation
Date: Sat, 23 May 2026 13:14:19 +0900 [thread overview]
Message-ID: <20260523041423.2726275-1-hyc.lee@gmail.com> (raw)
This series tightens validation of on-disk NTFS metadata in the read path.
The first four patches move index validation closer to the point
where index metadata is read and tighten the structural checks for both
$INDEX_ROOT and INDX block headers. The last patch adds a missing bounds
check before accessing fields in an EA entry.
To: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: charsyam@gmail.com
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Hyunchul Lee (4):
ntfs: validate index block header more strictly
ntfs: centalize $INDEX_ROOT header validation
ntfs: validate index entries on reading
ntfs: add bounds check before accessing EA entries
---
Changes in v2:
- Added a Tested-by tag.
- Addressed comments by DeaMyung Kang.
* Patch 1: Moved changes to make make ntfs_index_block_inconsistent()
return -EIO from patch 3.
* Patch 1: Made ntfs_index_header_inconsistent() verify the remaining
space before accessing index_header fields.
* Patch 4: Removed a redundant pre-loop check.
fs/ntfs/dir.c | 64 +++-------------
fs/ntfs/ea.c | 16 ++--
fs/ntfs/index.c | 197 ++++++++++++++++++++++++++++++++----------------
fs/ntfs/index.h | 12 ++-
fs/ntfs/inode.c | 15 ++--
5 files changed, 165 insertions(+), 139 deletions(-)
--
2.43.0
next reply other threads:[~2026-05-23 4:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 4:14 Hyunchul Lee [this message]
2026-05-23 4:14 ` [PATCH v2 1/4] ntfs: validate index block header more strictly Hyunchul Lee
2026-05-23 4:14 ` [PATCH v2 2/4] ntfs: centalize $INDEX_ROOT header validation Hyunchul Lee
2026-05-23 4:14 ` [PATCH v2 3/4] ntfs: validate index entries on reading Hyunchul Lee
2026-05-23 4:14 ` [PATCH v2 4/4] ntfs: add bounds check before accessing EA entries Hyunchul Lee
2026-05-25 2:56 ` [PATCH v2 0/4] ntfs: tighten EA and index metadata 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=20260523041423.2726275-1-hyc.lee@gmail.com \
--to=hyc.lee@gmail.com \
--cc=charsyam@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