CVE-2026-98279: btrfs: handle lack of space when cleaning up verity items
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
btrfs: handle lack of space when cleaning up verity items
When enable_verity() hits the qgroup limit, rollback_verity() needs its own metadata reservation. When the qgroup limit or lack of space refuses the rollback, the whole filesystem is forced read-only even though the qgroup limit was for one subvolume only. Also orphan cleanup at the next mount fails the same way, so the leftover items are never removed: with -EDQUOT the subvolume stays unreachable, and with -ENOSPC on a full filesystem the next read-write mount fails.
Start transactions with btrfs_start_transaction_fallback_global_rsv() in btrfs_orphan_cleanup(), drop_verity_items() and rollback_verity(). Those calls only delete items and free the space in the end, so they may use the global reserve and skip the qgroup limit, which avoids -ENOSPC and -EDQUOT.
The Linux kernel CVE team has assigned CVE-2026-98279 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 6.18.54 with commit 4b7ecabd87dc40998fe7870d7975279649229a3b Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 7.2.8 with commit efa5780b84f066f419a667f6b9542368b2f62074 Issue introduced in 5.15 with commit 146054090b0859b28fc39015c7704ccc3c3a347f and fixed in 7.3-rc4 with commit 76bf149cd0298544631e756670b89c399c7acbca
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98279
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/btrfs/inode.c
fs/btrfs/verity.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/4b7ecabd87dc40998fe7870d7975279649229a3b https://git.kernel.org/stable/c/efa5780b84f066f419a667f6b9542368b2f62074 https://git.kernel.org/stable/c/76bf149cd0298544631e756670b89c399c7acbca