CVE-2026-80537

Source
https://cve.org/CVERecord?id=CVE-2026-80537
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80537.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-80537
Downstream
Published
2026-08-26T14:37:12.180Z
Modified
2026-08-28T03:47:28.888116245Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
xfs: fix off-by-one in rtrefcount btree root level validation
Details

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

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

xfsrtrefcountbtcompute_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 mrtrefcmaxlevels - 1 and a cursor must satisfy bcnlevels <= bcmaxlevels (= mrtrefcmaxlevels).

The two on-disk validation paths, xfsrtrefcountbtverify() and xfsiformatrtrefcount(), check the root level with ">" instead of ">=", so a crafted rtreflink (metadir + realtime + reflink) image whose /rtgroups/N.refcount inode has bblevel == mrtrefcmaxlevels is accepted on mount. xfsrtrefcountbtinitcursor() then sets bcnlevels = bblevel + 1, exceeding bcmaxlevels by one. Since the xfsrtrefcountbtcur slab object is sized for exactly bcmaxlevels entries, the first btree op on such a cursor indexes bclevels[mrtrefcmaxlevels] past the end of the object. This is reached by the first rtrefcount cursor built after mount, via log/CoW recovery (xfsreflinkrecovercow() during xfsmountfs()) or an FSIOC_GETFSMAP over the realtime device.

Reject a root level equal to mrtrefcmaxlevels, 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 xfsbtreelookup (fs/xfs/libxfs/xfsbtree.c:2101) Write of size 2 at addr ffff888018391658 by task exploit/144 xfsbtreelookup (fs/xfs/libxfs/xfsbtree.c:2101) xfsbtreequeryrange (fs/xfs/libxfs/xfsbtree.c:5308) xfsrefcountrecovercowleftovers (fs/xfs/libxfs/xfsrefcount.c:2113) xfsreflinkrecovercow (fs/xfs/xfsreflink.c:1085) xlogrecoverfinish (fs/xfs/xfslogrecover.c:3551) xfsmountfs (fs/xfs/xfsmount.c:1158) xfsfsfillsuper (fs/xfs/xfssuper.c:1940) gettreebdevflags (fs/super.c:1634) vfsgettree (fs/super.c:1694) path_mount (fs/namespace.c:4161) _x64sysmount (fs/namespace.c:4367) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:121) The buggy address belongs to the cache xfsrtrefcountbtcur 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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80537.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
9abe03a0e4f978615a2b1b484b8d09ca84c16ea0
Fixed
8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d
Fixed
ccebfc309441e0b37b2e6ece90f18810a489d326
Fixed
cc3144da377de5fb422d44a2311f978623f7c900

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80537.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.14.0
Fixed
6.18.46
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.10

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-80537.json"