CVE-2026-99429: ocfs2: pin refcount trees before dropping the lookup lock

Published Nov 19, 2026
·
Updated

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

ocfs2: pin refcount trees before dropping the lookup lock

A refcount tree returned to ocfs2lockrefcounttree() must stay alive until that caller releases its operation reference. However, ocfs2getrefcounttree() returns the cached pointer after dropping osblock, and the caller only takes its kref afterwards. The registry reference does not protect this gap from concurrent removal.

This can happen when another node frees a refcount root and reuses its block with a different generation while this mount retains the old cached tree. Two local operations on different inodes sharing the new root, such as data CoW and an external xattr update, can then look up the same stale tree. Their inode locks are independent, and both the REFCOUNT DLM lock and rfsem are acquired after the first operation reference.

The following ordering is possible, with no other operation references:

Data CoW Xattr update -------- ------------ Look up the old tree under osblock, then drop osblock Look up the same tree and take a kref Acquire the tree locks and read the new on-disk generation Erase the old tree under osblock Unlock and drop the operation kref Drop the registry kref, freeing tree Take a kref through the freed tree pointer

The final krefget() accesses freed rfgetcnt storage, and subsequent accesses in ocfs2lockrefcounttree() also use the freed allocation.

Take the operation reference in ocfs2getrefcounttree() before releasing osblock, including when an insertion loses to another lookup. Removal must acquire the same lock, so it cannot drop the registry reference before the lookup has pinned the tree. Keep the existing unlock and error path puts. The two callers that already hold the refcount tree lock keep their borrowed lookup behavior and do not acquire an extra reference.

KASAN report as below:

BUG: KASAN: slab-use-after-free in ocfs2lockrefcounttree+0x94a/0x9b0 Read of size 4 at addr ffff888117212820 by task python3/497

[Kernel and hardware identification omitted.]

Call Trace: <TASK> dumpstacklvl+0x93/0xd0 printreport+0xce/0x630 ? ocfs2lockrefcounttree+0x94a/0x9b0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? virtaddrvalid+0x20e/0x420 ? ocfs2lockrefcounttree+0x94a/0x9b0 kasanreport+0xe0/0x110 ? ocfs2lockrefcounttree+0x94a/0x9b0 ocfs2lockrefcounttree+0x94a/0x9b0 ? pfxocfs2lockrefcounttree+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? ocfs2refcountcow+0x3b6/0xd90 ? srsoaliasreturnthunk+0x5/0xfbef5 ? kmalloccachenoprof+0x28d/0x610 ? ocfs2refcountcow+0x3b6/0xd90 ocfs2refcountcow+0x410/0xd90 ? pfxocfs2refcountcow+0x10/0x10 ? pfxmightresched+0x10/0x10 ? downwrite+0x11a/0x1f0 ? pfxdownwrite+0x10/0x10 ? ocfs2inodeunlock+0x1a9/0x260 ? pfxocfs2inodeunlock+0x10/0x10 ? ocfs2filewriteiter+0x1413/0x1d30 ocfs2filewriteiter+0x157b/0x1d30 ? pfxocfs2filewriteiter+0x10/0x10 ? lockacquire+0x190/0x300 ? x64syspwrite64+0x1b7/0x220 ? pfxmightresched+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? securityfilepermission+0x26/0x80 ? srsoaliasreturnthunk+0x5/0xfbef5 ? lockisheldtype+0x8f/0x100 vfswrite+0x639/0x1010 ? pfxocfs2filewriteiter+0x10/0x10 ? lockvmaunderrcu+0x154/0x4a0 ? pfxvfswrite+0x10/0x10 ? lockrelease+0x121/0x290 ? srsoaliasreturnthunk+0x5/0xfbef5 x64syspwrite64+0x1b7/0x220 ? pfxx64syspwrite64+0x10/0x10 ? irqentryexit+0xbe/0x820 ---truncated---

Affected Software

3 affected componentsFixes available
linux/kernel>=2.6.32<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.61
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.2

Event History

Nov 19, 2026
CVE Published
via MITRE·02:40 PM
Data Sourced
via MITRE·02:40 PM
Description
Data Sourced
via OSV·02:40 PM
DescriptionAffected Software
Data Sourced
via NVD·03:17 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203