[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175296153002.397842.308299159591338786.b4-ty@mit.edu>
Date: Sat, 19 Jul 2025 17:45:56 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>,
"Theodore Ts'o" <tytso@....edu>
Cc: linux-hardening@...r.kernel.org, ethan@...ancedwards.com
Subject: Re: [PATCH 1/3] ext4: replace strcmp with direct comparison for '.' and '..'
On Sat, 12 Jul 2025 14:12:47 -0400, Theodore Ts'o wrote:
> In a discussion over a proposed patch, "ext4: replace strcpy() with
> '.' assignment"[1], I had asserted that directory entries in ext4 were
> not NUL terminated, and hence it was safe to replace strcpy() with a
> direct assignment. As it turns out, this was incorrect. It's true
> for all all directory entries *except* for '.' and '..' where the
> kernel was using strcmp() and where e2fsck actually checks and offers
> to fix things if '.' and '..' are not NUL terminated.
>
> [...]
Applied, thanks!
[1/3] ext4: replace strcmp with direct comparison for '.' and '..'
commit: 3658b8b3398eb2a49ee8d1ac88e5cdc41764f1c9
[2/3] ext4: use memcpy() instead of strcpy()
commit: a35454ecf8a320c49954fdcdae0e8d3323067632
[3/3] ext4: refactor the inline directory conversion and new directory codepaths
commit: 90f097b1403f232a202c501bfd49b1b196e840ea
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists