CVE-2026-74728: xfs: handle NULL b_addr in xfs_buf_free
In the Linux kernel, the following vulnerability has been resolved:
xfs: handle NULL baddr in xfsbuffree
When xfsbufallocbackingmem() fails, xfsbuffree() is called with bp->baddr still NULL. The code falls through to the folioput path which calls virttofolio(NULL), dereferencing an invalid address and causing a kernel crash.
Call Trace: xfsbuffree+0x25f/0x510 xfsbufalloc+0xc98/0x19b0 xfsbuffindinsert+0x55/0x14d0 xfsbufgetmap+0x122b/0x17c0 xfbtreeinitleafblock+0x11c/0x4a0 xfbtreeinit+0x1bb/0x460 xreprmapsetupscan+0x100/0x1f0 xreprmapbt+0x41/0xc0
Fix this by skipping folioput() when bp->baddr is NULL.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.1.9-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.115-2~deb12u1 - Upgrade
Upgrade
ubuntu/linux-aws-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.18~24.04.1 - Upgrade
Upgrade
ubuntu/linux-azure-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1020.21~24.04.2 - Upgrade
Upgrade
ubuntu/linux-azure-fde-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1019.19~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.19~24.04.1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-oracle-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1016.18~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 7.0.0-1020.21 - Upgrade
Upgrade
ubuntu/linux-azure-fdeto a version that resolves this vulnerability.Fixed in 7.0.0-1019.19 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-gketo a version that resolves this vulnerability.Fixed in 7.0.0-1010.11 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 7.0.0-1023.23 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 7.0.0-43.43.1 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2Fixed in 7.1.9-1
Event History
Frequently Asked Questions
What condition triggers the crash?
The crash occurs when xfs_buf_alloc_backing_mem() fails and xfs_buf_free() is subsequently called while bp->b_addr is still NULL. The cleanup path calls folio_put(), which reaches virt_to_folio(NULL) and dereferences an invalid address.
What kernel activity is shown in the failing call trace?
The supplied trace shows the failure during XFS repair-related rmap processing, through xrep_rmapbt(), xrep_rmap_setup_scan(), and xfbtree initialization. The data does not establish whether other XFS paths can also reach the same allocation-failure cleanup path.
What does the fix change?
The fix prevents xfs_buf_free() from calling folio_put() when bp->b_addr is NULL. This avoids converting a NULL buffer address to a folio during cleanup after backing-memory allocation fails.