summaryrefslogtreecommitdiff
path: root/include/linux/serdev.h
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-06-08 18:49:14 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-06-09 15:50:55 +0300
commit097cdfd0a55df5af82c9753833f39a8bfadbcfcb (patch)
treeba13fa1b17cacc6f5eb6d23b531c139cf52fef6d /include/linux/serdev.h
parent390936fb15053d8d8991ca3a22776e251a5a7f2f (diff)
downloadlinux-097cdfd0a55df5af82c9753833f39a8bfadbcfcb.tar.xz
ntfs: reject non-resident records for resident-only attributes
The shared lookup-time attribute validator rejects non-resident $FILE_NAME and $VOLUME_NAME records because their formats require resident values and callers handle returned records as resident attributes. Other resident-only attribute types still pass through the generic non-resident mapping-pairs checks. That leaves real resident/non-resident union confusion paths. Inode load looks up $STANDARD_INFORMATION and then reads data.resident.value_offset without checking a->non_resident. ntfs_inode_sync_standard_information() does the same when updating the standard information value. ntfs_write_volume_flags() also looks up $VOLUME_INFORMATION and reads data.resident.value_offset directly. $INDEX_ROOT callers in dir.c and index.c depend on the same lookup contract before consuming the resident index root value. Reject non-resident records for all resident-only attribute types in the shared validator. Keep the existing $FILE_NAME and $VOLUME_NAME behavior, but factor it through a helper and extend it to $STANDARD_INFORMATION, $OBJECT_ID, $VOLUME_INFORMATION, $INDEX_ROOT, and $EA_INFORMATION. For $OBJECT_ID and $EA_INFORMATION this is contract hardening for resident-only formats; this patch only rejects the non-resident form and does not add new resident value validation for those types. 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/linux/serdev.h')
0 files changed, 0 insertions, 0 deletions