All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "William Chuang" <founder@logarcheon.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH v3] ext4: reject a non-regular boot loader inode in EXT4_IOC_SWAP_BOOT
Date: Tue, 17 Nov 2026 22:53:08 +0000	[thread overview]
Message-ID: <sashiko-outbox-219766@kernel.org> (raw)
In-Reply-To: <20261117223350.6920-1-founder@logarcheon.com>

> swap_inode_boot_loader() gets the boot loader inode (inode 5) with
> EXT4_IGET_BAD.  On a new filesystem that inode is unused, its mode is
> 0, and ext4_iget() returns it as a bad inode, which make_bad_inode()
> sets to S_IFREG.  On a corrupted or crafted filesystem, ext4_iget()
> can instead return inode 5 as a directory or another non-regular type,
> fully set up with that type's inode and file operations.
> 
> Such an inode is first passed to lock_two_nondirectories(), which
> warns if it is a directory:
> 
>   WARNING: fs/inode.c:1271 at lock_two_nondirectories
>    swap_inode_boot_loader
>    __ext4_ioctl
> 
> The "never used as a boot loader" branch then sets inode_bl->i_mode
> [ ... ]
> Fixes: 991ed014de08 ("ext4: fix bug_on in __es_tree_search caused by bad boot loader inode")
> Suggested-by: Theodore Ts'o <tytso@mit.edu>
> Link: https://lore.kernel.org/all/tencent_DABB2333139E8D1BCF4B5D1B2725FABA9108@qq.com/T/
> Link: https://sashiko.dev/#/bug/linux-8cfc8e22-8259-4c89-8a8b-64c16e4481a5
> Signed-off-by: William Chuang <founder@logarcheon.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117223350.6920-1-founder@logarcheon.com?part=1


      reply	other threads:[~2026-11-17 22:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  6:18 [PATCH] ext4: reject a non-regular boot loader inode in EXT4_IOC_SWAP_BOOT William Chuang
2026-11-17  6:43 ` sashiko-bot
2026-11-17  6:56 ` [PATCH v2] " William Chuang
2026-11-17  7:15   ` sashiko-bot
2026-11-17 22:33   ` [PATCH v3] " William Chuang
2026-11-17 22:53     ` 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-219766@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=founder@logarcheon.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.