CVE-2026-99849: fsverity: Tell LSMs about signature only after verity is enabled
In the Linux kernel, the following vulnerability has been resolved:
fsverity: Tell LSMs about signature only after verity is enabled
FSIOCENABLEVERITY calls securityinodesetintegrity() 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 securityinodesetintegrity(), it also checks ISVERITY(), which can be bypassed by enabling verity with no signature after the file writes.)
Fix this by moving the call to securityinodesetintegrity() out of fsverityverifysignature() and into a new function that is called from the appropriate places.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Move the call to security_inode_setintegrity() out of fsverity_verify_signature() and invoke it from a new function at the appropriate points after verity has finished being enabled.