From: Chao Yu <chao@kernel.org>
To: Samuel Moelius <sam.moelius@trailofbits.com>,
Jaegeuk Kim <jaegeuk@kernel.org>
Cc: chao@kernel.org,
"open list:F2FS FILE SYSTEM"
<linux-f2fs-devel@lists.sourceforge.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] f2fs: validate dentry name length before lookup compares it
Date: Mon, 15 Jun 2026 11:16:41 +0800 [thread overview]
Message-ID: <069c7bab-42aa-4e0d-b113-5919ec346fb5@kernel.org> (raw)
In-Reply-To: <20260603161127.17464-1-sam.moelius@trailofbits.com>
On 6/4/26 00:11, Samuel Moelius wrote:
> The f2fs dentry lookup path can use the on-disk name length before
> checking that the name fits in the dentry filename area. A corrupted
> dentry can then make lookup read beyond the filename slots.
>
> The bounds check needs to happen before any comparison that consumes
> the name length from disk.
>
> Reject dentries with invalid name lengths before comparing their names.
Will be better to merge two patch into one:
f2fs: validate inline dentry name lengths before conversion
f2fs: validate dentry name length before lookup compares it
>
> Assisted-by: Codex:gpt-5.5-cyber-preview
> Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com>
Anyway, this patch looks good to me.
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2026-06-15 3:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 16:11 Samuel Moelius
2026-06-15 3:16 ` Chao Yu [this message]
2026-06-16 2:50 ` [f2fs-dev] " patchwork-bot+f2fs
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=069c7bab-42aa-4e0d-b113-5919ec346fb5@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sam.moelius@trailofbits.com \
/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
all inboxes | Powered by JetHome®