VDB

CVE-2026-23249

CVE-2026-23249 PUBLISHED

xfs: check for deleted cursors when revalidating two btrees

Reported by linux · Published March 18, 2026

In the Linux kernel, the following vulnerability has been resolved: xfs: check for deleted cursors when revalidating two btrees The free space and inode btree repair functions will rebuild both btrees at the same time, after which it needs to evaluate both btrees to confirm that the corruptions are gone. However, Jiaming Zhang ran syzbot and produced a crash in the second xchk_allocbt call. His root-cause analysis is as follows (with minor corrections): In xrep_revalidate_allocbt(), xchk_allocbt() is called twice (first for BNOBT, second for CNTBT). The cause of this issue is that the first call nullified the cursor required by the second call. Let's first enter xrep_revalidate_allocbt() via following call chain: xfs_file_ioctl() -> xfs_ioc_scrubv_metadata() -> xfs_scrub_metadata() -> `sc->ops->repair_eval(sc)` -> xrep_revalidate_allocbt() xchk_allocbt() is called twice in this function. In the first call: /* Note that sc->sm->sm_type is XFS_SCRUB_TYPE_BNOPT now */ xchk_allocbt() -> xchk_btree() -> `bs->scrub_rec(bs, recp)` -> xchk_allocbt_rec() -> xchk_allocbt_xref() -> xchk_allocbt_xref_other() since sm_type is XFS_SCRUB_TYPE_BNOBT, pur is set to &sc->sa.cnt_cur. Kernel called xfs_alloc_get_rec() and returned -EFSCORRUPTED. Call chain: xfs_alloc_get_rec() -> xfs_btree_get_rec() -> xfs_btree_check_block() -> (XFS_IS_CORRUPT || XFS_TEST_ERROR), the former is false and the latter is true, return -EFSCORRUPTED. This should be caused by ioctl$XFS_IOC_ERROR_INJECTION I guess. Back to xchk_allocbt_xref_other(), after receiving -EFSCORRUPTED from xfs_alloc_get_rec(), kernel called xchk_should_check_xref(). In this function, *curpp (points to sc->sa.cnt_cur) is nullified. Back to xrep_revalidate_allocbt(), since sc->sa.cnt_cur has been nullified, it then triggered null-ptr-deref via xchk_allocbt() (second call) -> xchk_btree(). So. The bnobt revalidation failed on a cross-reference attempt, so we deleted the cntbt cursor, and then crashed when we tried to revalidate the cntbt. Therefore, check for a null cntbt cursor before that revalidation, and mark the repair incomplete. Also we can ignore the second tree entirely if the first tree was rebuilt but is already corrupt. Apply the same fix to xrep_revalidate_iallocbt because it has the same problem.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernel6.18-toolsAmazon Linux1:6.18.16-18.222.amzn2023
bpftool6.18Amazon Linux1:6.18.16-18.222.amzn2023
kernel6.18-modules-extra-commonAmazon Linux1:6.18.16-18.222.amzn2023
kernel6.18-headersAmazon Linux1:6.18.16-18.222.amzn2023
python3-perf6.18Amazon Linux1:6.18.16-18.222.amzn2023
perf6.18Amazon Linux1:6.18.16-18.222.amzn2023
python3-perf6.12Amazon Linux1:6.12.77-99.140.amzn2023
kernel6.12-modules-extraAmazon Linux1:6.12.77-99.140.amzn2023
kernel6.18-libbpf-staticAmazon Linux1:6.18.16-18.222.amzn2023

Affected products

VendorProductVersions
LinuxLinuxdbfbf3bdf639a20da7d5fb390cd2e197d25aa418, dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, dbfbf3bdf639a20da7d5fb390cd2e197d25aa418
LinuxLinux6.8, 0, 6.12.75
amazon:2023kernel6.18-tools0
amazon:2023bpftool6.180
amazon:2023kernel6.18-modules-extra-common0
amazon:2023kernel6.18-headers0
amazon:2023python3-perf6.180
amazon:2023perf6.180
amazon:2023python3-perf6.120
amazon:2023kernel6.12-modules-extra0
amazon:2023kernel6.18-libbpf-static0
linuxlinux_kernel6.8, 6.8, 6.8
amazon:2023kernel6.120
amazon:2023kernel-livepatch-6.18.16-18.2220
amazon:2023kernel6.12-devel0
amazon:2023kernel6.12-libbpf-static0
amazon:2023kernel6.18-tools-devel0
amazon:2023kernel6.18-modules-extra0
amazon:2023kernel6.12-tools0
amazon:2023kernel6.180

…and 12 more

Timeline

  • Mar 18, 2026 CVE Published
  • Mar 19, 2026 EPSS Score (30 in total, the first dated here)
  • Mar 22, 2026 Coalition ESS Score (2 in total, the first dated here)
  • Apr 2, 2026 Security Advisory (66 in total, the first dated here)
  • Aug 5, 2026 CVE Updated
  • Aug 11, 2026 Distribution Patch (61 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2026-23249
vulnetix vdb fixes CVE-2026-23249

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-23249/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›