HIGH Introduced in 6.14
xfs MaxLevels OOB
CVE-2026-97548
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
KernelScan AI6.7MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: xfs: fix the rtrmap and rtrefcount _maxlevels_ondisk functions The _maxlevels_ondisk functions are used to compute the size of in-memory btree cursors for each btree type. Unfortunately, LOLLM noticed that the rtrmap and rtrefcount versions of these functions forget to account for the inode root, which means that we could access beyond the end of the cursor given a sufficiently large btree. Fix this.
02KernelScan AI Analysis
Risk summary
A crafted XFS filesystem with realtime rmap or refcount btrees can cause the kernel to allocate an undersized btree cursor and then access past its end, corrupting kernel heap memory. This requires mounting a malicious filesystem image, which needs root-level privileges. The resulting memory corruption can lead to kernel crashes or potentially arbitrary code execution.
Vulnerability analysis
The XFS driver for realtime metadata btrees miscalculates how many levels a btree can have, so it allocates an in-memory tracking structure that is one level too small. When the kernel later walks a sufficiently deep tree, it writes past the end of that structure into adjacent heap memory. The corrected calculation now accounts for the root level, so the structure is sized correctly. A local attacker can trigger this by mounting a crafted XFS filesystem image containing an oversized realtime btree; mounting requires administrator privileges.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 6.14 | 6.18.53 | 108114437915 |
| 7.2 | 6.14 | 7.2.7 | 84316cb25af9 |
| mainline | 6.14 | 7.3-rc3 | aa301322f72f |