mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bryam Vargas <hexlabsecurity@proton.me>
To: Hyunchul Lee <hyc.lee@gmail.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] ntfs: bound the attribute-list entry in ntfs_read_inode_mount()
Date: Mon, 08 Jun 2026 01:51:07 +0000	[thread overview]
Message-ID: <20260608015102.36271-1-hexlabsecurity@proton.me> (raw)
In-Reply-To: <CANFS6bbHSkaPXyJvbs7QbvVKKXzjMvs3thweXYbEvoEKow5=0Q@mail.gmail.com>

On Thu, 4 Jun 2026 17:44:45 +0900 Hyunchul Lee <hyc.lee@gmail.com> 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


  reply	other threads:[~2026-06-08  1:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 17:59 [PATCH v2 1/3] ntfs: validate resident attribute lists and harden the validator Bryam Vargas
2026-06-03 18:00 ` [PATCH v2 2/3] ntfs: bound the look-ahead attribute-list entry in ntfs_external_attr_find() Bryam Vargas
2026-06-03 18:00 ` [PATCH v2 3/3] ntfs: bound the attribute-list entry in ntfs_read_inode_mount() Bryam Vargas
2026-06-04  4:29 ` [PATCH v3 1/3] ntfs: validate resident attribute lists and harden the validator Bryam Vargas
2026-06-04  4:29   ` [PATCH v3 2/3] ntfs: bound the look-ahead attribute-list entry in ntfs_external_attr_find() Bryam Vargas
2026-06-04  8:41     ` Hyunchul Lee
2026-06-04  4:29   ` [PATCH v3 3/3] ntfs: bound the attribute-list entry in ntfs_read_inode_mount() Bryam Vargas
2026-06-04  8:44     ` Hyunchul Lee
2026-06-08  1:51       ` Bryam Vargas [this message]
2026-06-04  8:40   ` [PATCH v3 1/3] ntfs: validate resident attribute lists and harden the validator Hyunchul Lee

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=20260608015102.36271-1-hexlabsecurity@proton.me \
    --to=hexlabsecurity@proton.me \
    --cc=hyc.lee@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