summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-06-08 18:49:17 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-06-09 15:51:01 +0300
commitfcf5bf0e8570798970e3ae8c95d04765ba2c5b97 (patch)
tree5a0fee53f7990bcc0f47a8d4330270fa5893dc3e /include/uapi
parente782ca90ceb798bb1811b214bf814216f11aae6a (diff)
downloadlinux-fcf5bf0e8570798970e3ae8c95d04765ba2c5b97.tar.xz
ntfs: validate resident index root values on lookup
Resident $INDEX_ROOT values carry index header fields that callers consume after lookup. Some callers already validate parts of the layout before walking entries, but those checks are scattered and do not cover all root header invariants, such as entries_offset alignment and lower bound, index_length, and allocated_size consistency. The resident root resize paths now keep these header fields consistent while the value size changes: ntfs_ir_truncate() lowers index.allocated_size before shrinking the resident value, and ntfs_ir_reparent() grows the resident value before publishing a larger root header. Lookup-time validation can therefore cover these invariants without tripping over the driver's own resize paths. Add $INDEX_ROOT to the minimum resident value size table and validate the resident index header fields before returning the attribute from lookup. Require 8-byte aligned index header fields, a sane entries_offset, an index_length within allocated_size, allocated_size within the resident value, and enough entry space for at least an index entry header. The shared validator already rejects non-resident records for resident-only attribute types, including $INDEX_ROOT. Cc: stable@vger.kernel.org # v7.1 Signed-off-by: DaeMyung Kang <charsyam@gmail.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions