[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <165849767595.303416.1808968339954270899.b4-ty@mit.edu>
Date: Fri, 22 Jul 2022 09:58:16 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: linux-ext4@...r.kernel.org, Lukas Czerner <lczerner@...hat.com>
Cc: "Theodore Ts'o" <tytso@....edu>, stable@...r.kernel.org
Subject: Re: [PATCH 1/2] ext4: check if directory block is within i_size
On Mon, 4 Jul 2022 16:27:20 +0200, Lukas Czerner wrote:
> Currently ext4 directory handling code implicitly assumes that the
> directory blocks are always within the i_size. In fact ext4_append()
> will attempt to allocate next directory block based solely on i_size and
> the i_size is then appropriately increased after a successful
> allocation.
>
> However, for this to work it requires i_size to be correct. If, for any
> reason, the directory inode i_size is corrupted in a way that the
> directory tree refers to a valid directory block past i_size, we could
> end up corrupting parts of the directory tree structure by overwriting
> already used directory blocks when modifying the directory.
>
> [...]
Applied, thanks!
[1/2] ext4: check if directory block is within i_size
commit: 65d23bd6e76ae07cee50c24d1fbeea4044aa41e7
[2/2] ext4: make sure ext4_append() always allocates new block
commit: 6d3ab9450ea5ec08882ab2f255827f1a39e300de
Best regards,
--
Theodore Ts'o <tytso@....edu>
Powered by blists - more mailing lists