CVE-2026-74728: xfs: handle NULL b_addr in xfs_buf_free

Published Aug 22, 2026
·
Updated

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

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Apply the kernel fix so that xfs_buf_free() checks bp->b_addr for NULL and skips the folio_put() path when bp->b_addr is NULL (to avoid virt_to_folio(NULL) dereference and kernel crash).

    Linux kernel (XFS) xfs_buf_free() NULL handling = Skip folio_put() when bp->b_addr is NULL

Event History

Aug 22, 2026
CVE Published
via MITRE·03:33 PM
Data Sourced
via MITRE·03:33 PM
Description
Data Sourced
via NVD·04:16 PM
Description

Frequently Asked Questions

1

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.

2

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.

3

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203