From: Eric Biggers <ebiggers@kernel.org>
To: fsverity@lists.linux.dev
Cc: linux-security-module@vger.kernel.org, Fan Wu <wufan@kernel.org>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E . Hallyn" <serge@hallyn.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] fsverity: Tell LSMs about signature only after verity is enabled
Date: Wed, 28 Oct 2026 11:06:35 -0700 [thread overview]
Message-ID: <20261028180635.GB1876@quark> (raw)
In-Reply-To: <20261025204534.122506-1-ebiggers@kernel.org>
On Sun, Oct 25, 2026 at 01:45:34PM -0700, Eric Biggers wrote:
> FS_IOC_ENABLE_VERITY calls security_inode_setintegrity() before verity
> has finished being enabled. That's broken because enabling verity can
> still fail at that point, e.g. due to insufficient xattr space.
>
> Afterwards, arbitrary contents can be written to the file, which doesn't
> actually have verity enabled. The in-core inode stays the same, so the
> LSM considers it to have verity enabled with a valid signature. (Or
> rather, in the case of IPE, which is the only LSM that implements
> security_inode_setintegrity(), it also checks IS_VERITY(), which can be
> bypassed by enabling verity with no signature after the file writes.)
>
> Fix this by moving the call to security_inode_setintegrity() out of
> fsverity_verify_signature() and into a new function that is called from
> the appropriate places.
>
> Fixes: 7c373e4f1445 ("fsverity: expose verified fsverity built-in signatures to LSMs")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Applied to https://git.kernel.org/pub/scm/fs/fsverity/linux.git/log/?h=for-current
- Eric
prev parent reply other threads:[~2026-10-28 18:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 20:45 [PATCH] fsverity: Tell LSMs about signature only after verity is enabled Eric Biggers
2026-10-25 20:57 ` sashiko-bot
2026-10-25 21:58 ` Fan Wu
2026-10-28 18:06 ` Eric Biggers [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=20261028180635.GB1876@quark \
--to=ebiggers@kernel.org \
--cc=fsverity@lists.linux.dev \
--cc=jmorris@namei.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.com \
--cc=stable@vger.kernel.org \
--cc=wufan@kernel.org \
/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