Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] fsverity: Set S_VERITY only after rollback is no longer possible
Date: Sun, 25 Oct 2026 21:01:41 +0000	[thread overview]
Message-ID: <sashiko-outbox-184445@kernel.org> (raw)
In-Reply-To: <20261025204807.122875-1-ebiggers@kernel.org>

> Commit f77f281b6118 ("fsverity: use a hashtable to find the
> fsverity_info") changed the implementation of FS_IOC_ENABLE_VERITY to
> make concurrent reads start going through fsverity verification slightly
> earlier than they did before.
> 
> Instead of it happening when enable_verity() calls fsverity_set_info(),
> it now happens when ->end_enable_verity() sets S_VERITY.
> 
> However, ext4 and btrfs can roll back verity after they set S_VERITY,
> causing a use-after-free.
> 
> Fix that by making ext4 and btrfs set S_VERITY only after rollback is no
> longer possible.  On failure, don't roll back S_VERITY, but do roll back
> the filesystem-specific verity flag.
> 
> Also update enable_verity() to handle any future instances of this bug
> more safely by warning and *not* freeing the fsverity_info.
> 
> Finally, tweak some comments.  Clarify one, and move information from
> another to its proper place in the comment for ->end_enable_verity().
> 
> Fixes: f77f281b6118 ("fsverity: use a hashtable to find the fsverity_info")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261025204807.122875-1-ebiggers@kernel.org?part=1


  reply	other threads:[~2026-10-25 21:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-25 20:48 [PATCH] fsverity: Set S_VERITY only after rollback is no longer possible Eric Biggers
2026-10-25 21:01 ` sashiko-bot [this message]
2026-10-27 15:08 ` Christoph Hellwig
2026-10-28 18:07 ` Eric Biggers

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-184445@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ebiggers@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox