# CVE-2026-23249: xfs: check for deleted cursors when revalidating two btrees

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.21% (percentile 7, 2026-11-28)
- **CWE:** CWE-476
- **Published:** 2026-03-18T17:01:40.653Z
- **Modified:** 2026-11-05T22:18:08.647Z

## Who should check

- Anyone running Linux \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< d69de525bc7ab27713342080bf50826df3f6a68f; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< b04baa848c0543b240b1bd8aecff470382f6f154; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 5991e96f2ae82df60a3e4ed00f3432d9f3502a99; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 55e03b8cbe2783ec9acfb88e8adb946ed504e117
- Anyone running Linux 6.8

## Description

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.

## Affected and fixed versions

- Linux: \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< d69de525bc7ab27713342080bf50826df3f6a68f; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< b04baa848c0543b240b1bd8aecff470382f6f154; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 5991e96f2ae82df60a3e4ed00f3432d9f3502a99; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 55e03b8cbe2783ec9acfb88e8adb946ed504e117 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 55e03b8cbe2783ec9acfb88e8adb946ed504e117 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-23249. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-23249.md
Affected: Linux >= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, < d69de525bc7ab27713342080bf50826df3f6a68f; >= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, < b04baa848c0543b240b1bd8aecff470382f6f154; >= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, < 5991e96f2ae82df60a3e4ed00f3432d9f3502a99; >= dbfbf3bdf639a20da7d5fb3…
Fixed in: Linux 5991e96f2ae82df60a3e4ed00f3432d9f3502a99, Linux 55e03b8cbe2783ec9acfb88e8adb946ed504e117

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-23249 being exploited?

There is no confirmed exploitation: CVE-2026-23249 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-23249?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-23249?

Linux \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< d69de525bc7ab27713342080bf50826df3f6a68f; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< b04baa848c0543b240b1bd8aecff470382f6f154; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 5991e96f2ae82df60a3e4ed00f3432d9f3502a99; \>= dbfbf3bdf639a20da7d5fb390cd2e197d25aa418, \< 55e03b8cbe2783ec9acfb88e8adb946ed504e117; Linux 6.8.

### Is there a fix for CVE-2026-23249?

Yes. Fixed in Linux 5991e96f2ae82df60a3e4ed00f3432d9f3502a99, Linux 55e03b8cbe2783ec9acfb88e8adb946ed504e117. Upgrade Linux to 55e03b8cbe2783ec9acfb88e8adb946ed504e117 or later.

### How do I check if I'm affected by CVE-2026-23249?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d69de525bc7ab27713342080bf50826df3f6a68f>
- patch: <https://git.kernel.org/stable/c/b04baa848c0543b240b1bd8aecff470382f6f154>
- patch: <https://git.kernel.org/stable/c/5991e96f2ae82df60a3e4ed00f3432d9f3502a99>
- patch: <https://git.kernel.org/stable/c/55e03b8cbe2783ec9acfb88e8adb946ed504e117>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-23249>

HTML: <https://flawdb.com/CVE-2026-23249> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-23249>
