This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hurd".
The branch, master has been updated
via ef8480a8d28bb9c6b8b714d912975e66526d1a03 (commit)
from f36ab347197eac485fa1fd982728541baaec0d9d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ef8480a8d28bb9c6b8b714d912975e66526d1a03
Author: Milos Nikic <[email protected]>
Date: Fri Oct 9 22:36:05 2026 -0700
ext2fs: Fix truncation bug inside double and triple indirect blocks
trunc_indirect took END - OFFSET as the index of the first entry to
free at every level of indirection. That is right for a single
indirect block only; an entry of a double (triple) indirect block
covers addr_per_block (addr_per_block^2) blocks. A truncation to a
size inside those ranges thus started at the wrong entry or freed
nothing, leaving the blocks past the new end allocated. A file that
later grows over them gets their old contents back instead of zeros.
Steps to reproduce (with or without the journal):
sudo settrans -ac /mnt/stress /hurd/ext2fs.static /dev/sd0
sudo dd if=/dev/urandom of=/mnt/stress/f bs=1M count=7
sudo truncate -s 6000000 /mnt/stress/f
sudo settrans -ga /mnt/stress && sudo /sbin/fsck.ext2 -fn /dev/sd0
Inode 16996, i_size is 6000000, should be 7340032. Fix? no
Message-ID: <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
ext2fs/truncate.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
hooks/post-receive
--
Hurd