# CVE-2026-80537: xfs: fix off-by-one in rtrefcount btree root level validation

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.17% (percentile 4, 2026-11-26)
- **Published:** 2026-08-26T14:37:12.180Z
- **Modified:** 2026-08-27T06:17:34.210Z

## Who should check

- Anyone running Linux \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< ccebfc309441e0b37b2e6ece90f18810a489d326; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< cc3144da377de5fb422d44a2311f978623f7c900
- Anyone running Linux 6.14

## Description

In the Linux kernel, the following vulnerability has been resolved:

xfs: fix off-by-one in rtrefcount btree root level validation

xfs\_rtrefcountbt\_compute\_maxlevels() sets

	mp-\>m\_rtrefc\_maxlevels = min(d\_maxlevels, r\_maxlevels) + 1;

where the trailing "+ 1" already accounts for the inode-root level, so the
deepest valid on-disk root level is m\_rtrefc\_maxlevels - 1 and a cursor must
satisfy bc\_nlevels \<= bc\_maxlevels (= m\_rtrefc\_maxlevels).

The two on-disk validation paths, xfs\_rtrefcountbt\_verify() and
xfs\_iformat\_rtrefcount(), check the root level with "\>" instead of "\>=", so a
crafted rtreflink (metadir + realtime + reflink) image whose
/rtgroups/N.refcount inode has bb\_level == m\_rtrefc\_maxlevels is accepted on
mount. xfs\_rtrefcountbt\_init\_cursor() then sets bc\_nlevels = bb\_level + 1,
exceeding bc\_maxlevels by one. Since the xfs\_rtrefcountbt\_cur slab object is
sized for exactly bc\_maxlevels entries, the first btree op on such a cursor
indexes bc\_levels\[m\_rtrefc\_maxlevels\] past the end of the object. This is
reached by the first rtrefcount cursor built after mount, via log/CoW
recovery (xfs\_reflink\_recover\_cow() during xfs\_mountfs()) or an
FS\_IOC\_GETFSMAP over the realtime device.

Reject a root level equal to m\_rtrefc\_maxlevels, matching the "\>=" form
already used by the sibling data-device refcount/rmap verifiers and the
in-memory rtrmap verifier.

  BUG: KASAN: slab-out-of-bounds in xfs\_btree\_lookup (fs/xfs/libxfs/xfs\_btree.c:2101)
  Write of size 2 at addr ffff888018391658 by task exploit/144
   xfs\_btree\_lookup (fs/xfs/libxfs/xfs\_btree.c:2101)
   xfs\_btree\_query\_range (fs/xfs/libxfs/xfs\_btree.c:5308)
   xfs\_refcount\_recover\_cow\_leftovers (fs/xfs/libxfs/xfs\_refcount.c:2113)
   xfs\_reflink\_recover\_cow (fs/xfs/xfs\_reflink.c:1085)
   xlog\_recover\_finish (fs/xfs/xfs\_log\_recover.c:3551)
   xfs\_mountfs (fs/xfs/xfs\_mount.c:1158)
   xfs\_fs\_fill\_super (fs/xfs/xfs\_super.c:1940)
   get\_tree\_bdev\_flags (fs/super.c:1634)
   vfs\_get\_tree (fs/super.c:1694)
   path\_mount (fs/namespace.c:4161)
   \_\_x64\_sys\_mount (fs/namespace.c:4367)
   entry\_SYSCALL\_64\_after\_hwframe (arch/x86/entry/entry\_64.S:121)
  The buggy address belongs to the cache xfs\_rtrefcountbt\_cur of size 216
  The buggy address is located 8 bytes to the right of
   allocated 216-byte region \[ffff888018391578, ffff888018391650)
  Kernel panic - not syncing: Fatal exception

## Affected and fixed versions

- Linux: \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< ccebfc309441e0b37b2e6ece90f18810a489d326; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< cc3144da377de5fb422d44a2311f978623f7c900 (cvelist)
- Linux: 6.14 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-80537.md
Affected: Linux >= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, < 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d; >= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, < ccebfc309441e0b37b2e6ece90f18810a489d326; >= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, < cc3144da377de5fb422d44a2311f978623f7c900; Linux 6.14
Fixed in: Linux 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d

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-80537 being exploited?

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

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

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< ccebfc309441e0b37b2e6ece90f18810a489d326; \>= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \< cc3144da377de5fb422d44a2311f978623f7c900; Linux 6.14.

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

Yes. Fixed in Linux 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d>
- other: <https://git.kernel.org/stable/c/ccebfc309441e0b37b2e6ece90f18810a489d326>
- other: <https://git.kernel.org/stable/c/cc3144da377de5fb422d44a2311f978623f7c900>

## 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-80537>

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