Executive brief
XFS is a file system driver in the Linux kernel used to store and manage data on storage devices. During file system recovery at mount time, a malicious or corrupted file system image can trigger an out-of-bounds memory write in the XFS log recovery code, corrupting kernel heap memory and potentially leading to kernel crashes or privilege escalation. This vulnerability affects any system that mounts a crafted or attacker-controlled XFS image.
Technical details
The vulnerability is a heap buffer overflow in xlog_recover_do_reg_buffer(), a function that replays XFS transaction log entries during file system mount recovery. The function copies logged data into a buffer using memcpy(), with both the copy size and destination offset derived from an attacker-controlled bitmap in the log. The only validation was an ASSERT() macro, which is disabled in production (non-DEBUG) kernels, allowing an attacker to craft an XFS image with a small buffer length (blf_len) and a bitmap bit position beyond that buffer's end, driving the memcpy() past the allocation boundary and corrupting adjacent kernel heap. The fix replaces the ASSERT() with an actual XFS_IS_CORRUPT() check that fails recovery cleanly with -EFSCORRUPTED. This is reachable by anyone who can mount a crafted XFS image (the documented threat model for XFS).
Affected products
- Linux Linux kernel 2.6.12 and later (all versions prior to fix)
Timeline
- 2026-08-26: disclosed: CVE-2026-80536 published
- 2026-07-22: patched: Upstream fix committed (commit 813f8136a2ce1fee266d02a7df73db6e8a541604)
- 2026-08-27: patched: Stable kernel fix released (commit 7e32d4eebae6ca24f8a673c107fd7eca1f47afc2)