HIGH
btrfs RaidStripe UAF
CVE-2026-98083
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI7.5HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix transaction use-after-free in raid stripe insertion If allocation of a RAID stripe extent fails, btrfs_insert_one_raid_extent() aborts and ends the transaction before returning -ENOMEM. btrfs_finish_one_ordered(), the production caller through btrfs_insert_raid_extent(), still owns the transaction handle. It handles the error by aborting the transaction and then reaches the common exit path, which ends the transaction again. The premature end can free the handle and drop its transaction reference. Transaction cleanup can then free the transaction before the caller's second abort accesses the handle and transaction, resulting in use-after-free. Keep the abort at the failure site, but let the caller's common exit path end the transaction once, after it has finished using both objects.
02KernelScan AI Analysis
Risk summary
A use-after-free in the btrfs RAID stripe tree can be triggered by any local user with write access to a mounted btrfs filesystem using the RAID stripe tree feature, when memory pressure causes a specific allocation to fail. Successful exploitation could lead to kernel memory corruption, privilege escalation, or system crash.
Vulnerability analysis
When a memory allocation fails during raid stripe extent insertion in btrfs, the error-handling path prematurely ends the transaction handle while the calling function still owns and expects to use it. Transaction cleanup can then free both the handle and the transaction before the caller's own error path accesses them again, resulting in a use-after-free. The fix removes the premature transaction end from the failure site while keeping the abort call, so the caller's normal cleanup path ends the transaction exactly once after it has finished using both objects. This vulnerability is reachable by any local user with write access to a mounted btrfs filesystem configured with RAID stripe tree, though triggering it requires creating memory pressure conditions that cause the specific allocation to fail at the right moment.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.6 | 6.6.130 | 6.6.158 | 089d9c45ea49 |
| 6.12 | — | 6.12.111 | b185bdf30313 |
| 6.18 | — | 6.18.53 | 2fbfd02bdfe1 |
| 7.2 | — | 7.2.7 | b7b94923b3b5 |
| mainline | — | 7.3-rc2 | a8813a923f9e |
| cip/6.12 | — | 6.12.111-cip32 | b185bdf30313 |