From: sashiko-bot@kernel.org
To: "Shuai Liu" <847807867@qq.com>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH v8] ext4: fix slab-use-after-free in do_split()
Date: Thu, 05 Nov 2026 02:19:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-198448@kernel.org> (raw)
In-Reply-To: <tencent_BA3A8C65555EB74908B7404C6562DC5D5705@qq.com>
> do_split() allocates a new directory block with ext4_append() to hold
> the second half of the entries of the leaf block being split, then
> dx_move_dirents() copies entries from the old block (*bh) into the new
> one (bh2). Nothing verifies that the newly allocated block differs
> from the block being split.
>
> On a filesystem whose block bitmap is inconsistent with the directory
> tree, a block already referenced as a directory leaf or as an htree
> index block can still be marked free, so ext4_append() can return that
> same block. With concurrent operations on such a filesystem (as
> exercised by the syzbot reproducer), the block can even be freed
> between allocations, resulting in bh2 aliasing *bh. dx_move_dirents()
> then copies the block onto itself, corrupting directory entries
> mid-copy: a rec_len field can be overwritten with name bytes, so the
> subsequent wipe of the stale entry memset()s a bogus length, causing
> [ ... ]
> Reported-by: syzbot+09bec78ee77613a3efdd@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=09bec78ee77613a3efdd
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Shuai Liu <847807867@qq.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/tencent_BA3A8C65555EB74908B7404C6562DC5D5705@qq.com?part=1
next prev parent reply other threads:[~2026-11-05 2:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <sashiko-outbox-197106@kernel.org>
2026-11-05 0:38 ` [PATCH v6] ext4: fix slab-use-after-free in do_split() Shuai Liu
2026-11-05 0:50 ` sashiko-bot
2026-11-05 1:01 ` [PATCH v7] " Shuai Liu
2026-11-05 1:19 ` sashiko-bot
2026-11-05 2:11 ` [PATCH v8] " Shuai Liu
2026-11-05 2:19 ` sashiko-bot [this message]
2026-11-06 9:02 ` Jan Kara
2026-11-06 9:16 ` Shuai Liu
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=sashiko-outbox-198448@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=847807867@qq.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.