Re: [PATCH 2/2] ntfs: validate resident file name attribute length

From: Namjae Jeon

Date: Mon May 25 2026 - 02:38:51 EST


> Validate $FILE_NAME before lookup can return the current attribute,
> including the AT_UNUSED enumeration case where callers inspect returned
> attributes directly. Reuse the same self-contained helper for both the
> base-record lookup path and the attribute-list lookup path. Log a
> specific corruption message at the rejection point, matching the
> existing attribute-name validation in ntfs_attr_find().
>
> Reject non-resident $FILE_NAME records too: the format requires
> $FILE_NAME to be resident and callers treat returned records as
> resident.
Could you refactor the existing min_value_length check into a unified
validation helper that covers all resident attributes ? Other resident
attributes(volume name, index root, ea_information, etc.) with
variable-length could be validated similarly.
Thanks!