HIGH Introduced in 2.6.12
xfs LogRecovery OOB
CVE-2026-80536
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.7MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: xfs: bounds-check buffer log item's dirty bitmap xlog_recover_do_reg_buffer() replays each dirty region described by a buffer log item's bitmap into the buffer read for that item: memcpy(xfs_buf_offset(bp, (uint)bit << XFS_BLF_SHIFT), item->ri_buf[i].iov_base, nbits << XFS_BLF_SHIFT); The destination offset (bit/nbits, from the logged dirty bitmap) and the buffer size (from the logged blf_len) are both attacker-controlled and otherwise unrelated, yet the only thing bounding the copy is an ASSERT(), which compiles away on production kernels. A crafted image logging a small blf_len together with a bitmap bit past the end of that buffer drives the memcpy() past the buffer's allocation, corrupting adjacent kernel heap during mount-time log recovery. This is reachable by anyone who can get a crafted image mounted -- the malicious-filesystem threat model XFS already guards against elsewhere. Turn the ASSERT() into a real XFS_IS_CORRUPT() check that aborts recovery of the buffer with -EFSCORRUPTED, consistent with the validate-and-fail idiom already used in xlog_recover_do_inode_buffer() and xfs_dquot_item_recover.c. xlog_recover_do_reg_buffer() therefore becomes STATIC int and its three callers propagate the error. Found and confirmed with KASAN on a CONFIG_XFS_DEBUG=n build: the crafted image trips a slab-out-of-bounds write before this change and fails recovery cleanly with -EFSCORRUPTED after it.
02KernelScan AI Analysis
Risk summary
A crafted XFS filesystem image can trigger an out-of-bounds heap write during mount-time log recovery, corrupting adjacent kernel heap memory. This is exploitable by anyone who can cause a malicious XFS image to be mounted on the target system, potentially leading to kernel code execution or denial of service.
Vulnerability analysis
During XFS mount-time log recovery, the kernel replays dirty buffer regions described by a bitmap in the buffer log item. The bitmap offsets and the buffer length both come from the on-disk log and are not validated against each other on production kernels—the only bounds check was a debug-only assertion that compiles away. A crafted image can therefore specify a small buffer length with bitmap bits pointing past its end, causing the replay memcpy to write beyond the buffer's allocation and corrupt adjacent kernel heap. The fix replaces the assertion with a real corruption check that aborts recovery of the affected buffer with an error, consistent with existing validation patterns in the XFS log recovery code. The vulnerable path is reached whenever a crafted XFS image is mounted, which requires an attacker to supply or replace filesystem data on a block device that the target will mount.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 2.6.12 | 5.10.267 | acb4e26295e7 |
| 5.15 | 2.6.12 | 5.15.218 | f3859c35a4fb |
| 6.1 | 2.6.12 | 6.1.185 | f7b5fa83e2c1 |
| 6.12 | 2.6.12 | 6.12.106 | 7e32d4eebae6 |
| 6.18 | 2.6.12 | 6.18.46 | f8288214459e |
| 6.6 | 2.6.12 | 6.6.154 | b7528b42813f |
| 7.1 | 2.6.12 | 7.1.10 | edaf5b6bd625 |
| mainline | 2.6.12 | 7.2 | 813f8136a2ce |
| cip/5.10 | 2.6.12 | 5.10.268-cip77 | acb4e26295e7 |
| cip/5.10-rt | 2.6.12 | 5.10.268-cip77-rt34 | acb4e26295e7 |
| cip/6.1 | 2.6.12 | 6.1.187-cip60 | f7b5fa83e2c1 |
| cip/6.1-rt | 2.6.12 | 6.1.189-cip61-rt32 | f7b5fa83e2c1 |
| cip/6.12 | 2.6.12 | 6.12.108-cip31 | 7e32d4eebae6 |
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.108-cip31 |
| cip/6.1 | Fixed in 6.1.187-cip60 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.268-cip77 |
| cip/5.10-rt | Fixed in 5.10.268-cip77-rt34 |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |