From: sashiko-bot@kernel.org
To: "Piyus Kedia" <piyus@iiitd.ac.in>, linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: Re: [PATCH] ext4: bound dot and dotdot of dx_root by the dirent tail
Date: Sun, 06 Dec 2026 13:14:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-252440@kernel.org> (raw)
In-Reply-To: <20261206125921.1326009-1-piyus@iiitd.ac.in>
> make_indexed_dir() moves out of block 0 everything between the end of
> the '..' entry, which it takes at its fixed offset, and the start of
> the dirent tail:
>
> fde = &root->dotdot;
> de = (struct ext4_dir_entry_2 *)((char *)fde +
> ext4_rec_len_from_disk(fde->rec_len, blocksize));
> len = ((char *) root) + (blocksize - csum_size) - (char *) de;
> ...
> memcpy(data2, de, len);
> memset(de, 0, len); /* wipe old data */
>
> ext4_check_dx_root() only rejects a '..' that reaches the end of the
> block. With metadata_csum the entries end csum_size (12) bytes
> earlier, so a '..' that ends inside the tail passes, and len, an
> [ ... ]
> Fixes: b0336e8d2108 ("ext4: calculate and verify checksums of directory leaf blocks")
> Closes: https://lore.kernel.org/r/ext4-dx-root-dotdot.20261206@iiitd.ac.in/
> Cc: stable@vger.kernel.org
> Signed-off-by: Kapil Vaswani <kapil@presceralabs.ai>
> Signed-off-by: Piyus Kedia <piyus@iiitd.ac.in>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261206125921.1326009-1-piyus@iiitd.ac.in?part=1
prev parent reply other threads:[~2026-12-06 13:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-06 12:59 [BUG] ext4: make_indexed_dir() copies and wipes 4 GiB when '..' ends inside the dirent tail Piyus Kedia
2026-12-06 12:59 ` [PATCH] ext4: bound dot and dotdot of dx_root by " Piyus Kedia
2026-12-06 13:14 ` sashiko-bot [this message]
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-252440@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=piyus@iiitd.ac.in \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox