PT-2026-151640
CVE-2026-99429
·
Published
2026-11-19
·
Updated
2026-11-19
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: pin refcount trees before dropping the lookup lock
A refcount tree returned to ocfs2 lock refcount tree() must stay alive
until that caller releases its operation reference. However,
ocfs2 get refcount tree() returns the cached pointer after dropping
osb lock, 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 rf sem 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
osb lock, then drop osb lock
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 osb lock
Unlock and drop the operation kref
Drop the registry kref, freeing tree
Take a kref through the
freed tree pointer
The final kref get() accesses freed rf getcnt storage, and subsequent
accesses in ocfs2 lock refcount tree() also use the freed allocation.
Take the operation reference in ocfs2 get refcount tree() before
releasing osb lock, 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 ocfs2 lock refcount tree+0x94a/0x9b0
Read of size 4 at addr ffff888117212820 by task python3/497
[Kernel and hardware identification omitted.]
Call Trace:
dump stack lvl+0x93/0xd0
print report+0xce/0x630
? ocfs2 lock refcount tree+0x94a/0x9b0
? srso alias return thunk+0x5/0xfbef5
? virt addr valid+0x20e/0x420
? ocfs2 lock refcount tree+0x94a/0x9b0
kasan report+0xe0/0x110
? ocfs2 lock refcount tree+0x94a/0x9b0
ocfs2 lock refcount tree+0x94a/0x9b0
? pfx ocfs2 lock refcount tree+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? ocfs2 refcount cow+0x3b6/0xd90
? srso alias return thunk+0x5/0xfbef5
? kmalloc cache noprof+0x28d/0x610
? ocfs2 refcount cow+0x3b6/0xd90
ocfs2 refcount cow+0x410/0xd90
? pfx ocfs2 refcount cow+0x10/0x10
? pfx might resched+0x10/0x10
? down write+0x11a/0x1f0
? pfx down write+0x10/0x10
? ocfs2 inode unlock+0x1a9/0x260
? pfx ocfs2 inode unlock+0x10/0x10
? ocfs2 file write iter+0x1413/0x1d30
ocfs2 file write iter+0x157b/0x1d30
? pfx ocfs2 file write iter+0x10/0x10
? lock acquire+0x190/0x300
? x64 sys pwrite64+0x1b7/0x220
? pfx might resched+0x10/0x10
? srso alias return thunk+0x5/0xfbef5
? security file permission+0x26/0x80
? srso alias return thunk+0x5/0xfbef5
? lock is held type+0x8f/0x100
vfs write+0x639/0x1010
? pfx ocfs2 file write iter+0x10/0x10
? lock vma under rcu+0x154/0x4a0
? pfx vfs write+0x10/0x10
? lock release+0x121/0x290
? srso alias return thunk+0x5/0xfbef5
x64 sys pwrite64+0x1b7/0x220
? pfx x64 sys pwrite64+0x10/0x10
? irqentry exit+0xbe/0x820
---truncated---
Found an issue in the description? Have something to add? Feel free to write us 👾