{
  "id": "CVE-2026-80537",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-80537",
  "published_at": "2026-08-26T14:37:12.18Z",
  "title": "xfs: fix off-by-one in rtrefcount btree root level validation",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nxfs: fix off-by-one in rtrefcount btree root level validation\n\nxfs_rtrefcountbt_compute_maxlevels() sets\n\n\tmp-\u003em_rtrefc_maxlevels = min(d_maxlevels, r_maxlevels) + 1;\n\nwhere the trailing \"+ 1\" already accounts for the inode-root level, so the\ndeepest valid on-disk root level is m_rtrefc_maxlevels - 1 and a cursor must\nsatisfy bc_nlevels \u003c= bc_maxlevels (= m_rtrefc_maxlevels).\n\nThe two on-disk validation paths, xfs_rtrefcountbt_verify() and\nxfs_iformat_rtrefcount(), check the root level with \"\u003e\" instead of \"\u003e=\", so a\ncrafted rtreflink (metadir + realtime + reflink) image whose\n/rtgroups/N.refcount inode has bb_level == m_rtrefc_maxlevels is accepted on\nmount. xfs_rtrefcountbt_init_cursor() then sets bc_nlevels = bb_level + 1,\nexceeding bc_maxlevels by one. Since the xfs_rtrefcountbt_cur slab object is\nsized for exactly bc_maxlevels entries, the first btree op on such a cursor\nindexes bc_levels[m_rtrefc_maxlevels] past the end of the object. This is\nreached by the first rtrefcount cursor built after mount, via log/CoW\nrecovery (xfs_reflink_recover_cow() during xfs_mountfs()) or an\nFS_IOC_GETFSMAP over the realtime device.\n\nReject a root level equal to m_rtrefc_maxlevels, matching the \"\u003e=\" form\nalready used by the sibling data-device refcount/rmap verifiers and the\nin-memory rtrmap verifier.\n\n  BUG: KASAN: slab-out-of-bounds in xfs_btree_lookup (fs/xfs/libxfs/xfs_btree.c:2101)\n  Write of size 2 at addr ffff888018391658 by task exploit/144\n   xfs_btree_lookup (fs/xfs/libxfs/xfs_btree.c:2101)\n   xfs_btree_query_range (fs/xfs/libxfs/xfs_btree.c:5308)\n   xfs_refcount_recover_cow_leftovers (fs/xfs/libxfs/xfs_refcount.c:2113)\n   xfs_reflink_recover_cow (fs/xfs/xfs_reflink.c:1085)\n   xlog_recover_finish (fs/xfs/xfs_log_recover.c:3551)\n   xfs_mountfs (fs/xfs/xfs_mount.c:1158)\n   xfs_fs_fill_super (fs/xfs/xfs_super.c:1940)\n   get_tree_bdev_flags (fs/super.c:1634)\n   vfs_get_tree (fs/super.c:1694)\n   path_mount (fs/namespace.c:4161)\n   __x64_sys_mount (fs/namespace.c:4367)\n   entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)\n  The buggy address belongs to the cache xfs_rtrefcountbt_cur of size 216\n  The buggy address is located 8 bytes to the right of\n   allocated 216-byte region [ffff888018391578, ffff888018391650)\n  Kernel panic - not syncing: Fatal exception",
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \u003c 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d",
          "\u003e= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \u003c ccebfc309441e0b37b2e6ece90f18810a489d326",
          "\u003e= 9abe03a0e4f978615a2b1b484b8d09ca84c16ea0, \u003c cc3144da377de5fb422d44a2311f978623f7c900"
        ],
        "fixed_in": [
          "8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d",
          "ccebfc309441e0b37b2e6ece90f18810a489d326",
          "cc3144da377de5fb422d44a2311f978623f7c900"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.14"
        ],
        "fixed_in": [
          "0",
          "6.18.46",
          "7.1.10",
          "7.2"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to 8a0ecae2ecda9f9a83a496ed05c42c4b1f5c3f2d or ccebfc309441e0b37b2e6ece90f18810a489d326 or cc3144da377de5fb422d44a2311f978623f7c900 or later.",
      "Upgrade Linux to 0 or 6.18.46 or 7.1.10 or 7.2 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
