HIGH Introduced in 6.0
xfs IunlinkRecovery UAF
CVE-2026-98443
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
KernelScan AI7.8HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: xfs: fix cursor and pointer handling when recovering iunlink buckets LOLLM pointed out a bug in xlog_recover_iunlink_bucket: 1. We don't null out prev_ip after releasing it, which can lead to UAF problems if the inodegc flush call in the loop fails. at which point I noticed even more bugs: 2. If the inodegc flush inside the loop fails, we also leak @ip. 3. We set prev_agino to agino having already advanced agino, which results in inodes with i_prev_unlinked set to itself. 4. If we exit the bottom of the loop with prev_ip set, then prev_ip aliases ip and we also set its i_prev_unlinked to itself. Bugs 3 and 4 introduce loops into the unlinked list, though these loops don't surface because we immediately flush each unlinked inode after loading it. Fix all of these issues.
02KernelScan AI Analysis
Risk summary
A local attacker who can mount a crafted XFS filesystem image can trigger a use-after-free during log recovery, leading to kernel memory corruption and privilege escalation. The vulnerability is reachable when the kernel processes a malicious filesystem at mount time, requiring only the ability to mount an attacker-controlled XFS image (e.g., via removable media or a privileged mount operation).
Vulnerability analysis
During XFS log recovery, the function xlog_recover_iunlink_bucket processes the unlinked inode list. The original code had multiple pointer management bugs: it failed to null out a pointer after releasing the referenced inode, creating a use-after-free if a subsequent flush operation failed; it leaked an inode reference on error; and it incorrectly linked inodes to themselves, creating list loops. The fix restructures the loop to acquire each inode in the loop scope, properly releases references on error paths, nulls out the previous pointer after release, and correctly sequences the list pointer updates to avoid self-referential links. An attacker who can cause a crafted XFS filesystem to be mounted (via removable media, a privileged mount, or a network filesystem client) triggers the vulnerable recovery path, potentially achieving arbitrary kernel code execution.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.1 | 6.0 | 6.1.191 | 8cfde7b2fb72 |
| 6.12 | 6.0 | 6.12.113 | 8c9d5b8a96d6 |
| 6.18 | 6.0 | 6.18.55 | 66a2179d0266 |
| 6.6 | 6.0 | 6.6.160 | 47a948ba653a |
| 7.2 | 6.0 | 7.2.9 | 961c717e6bf0 |
| mainline | 6.0 | 7.3 | 65f39d09d737 |
| cip/6.12 | 6.0 | 6.12.114-cip34 | 8c9d5b8a96d6 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |