Re: [PATCH v3 3/3] ntfs: bound the attribute-list entry in ntfs_read_inode_mount()

From: Bryam Vargas

Date: Sun Jun 07 2026 - 21:53:20 EST


On Thu, 4 Jun 2026 17:44:45 +0900 Hyunchul Lee <hyc.lee@xxxxxxxxx> wrote:
> It seems that some of the above conditions can be removed.

Right -- with ntfs_attr_list_entry_is_valid() in place the
"if (!al_entry->length)" check just above the call is redundant. The
validator forces name_offset == sizeof(struct attr_list_entry) and
requires name_offset + name_length * sizeof(__le16) <= length, so
length == 0 is already rejected there (and length must be a multiple of
8, so a valid entry is at least 32 bytes and next_al_entry still
advances -- no zero-length loop).

I'll drop that check in v4. v4 also rebases onto the attribute
value-validation series that was just applied: the
ntfs_external_attr_find() rework there overlaps the change 2/3 makes, so
the series needs to go on top of it.

Bryam