CVE-2026-99692: ocfs2: stop recovery before shutting down local allocators
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: stop recovery before shutting down local allocators
Recovery completion needs the local allocators until it has finished reclaiming a failed node's allocation window and truncate log. During unmount, quota recovery is stopped first, but that leaves recoverystate at OCFS2RECQUOTADISABLED. New non-quota recovery can still start.
ocfs2truncatelogshutdown() drains existing completion work and releases osbtlbh before ocfs2recoveryexit() closes that publication path:
Unmount Recovery ------- -------- stop quota recovery; disable quotas truncatelogshutdown() flush existing completion work recover another failed node queue completion flush local log; release buffer completetruncatelogrecovery() use released osbtlbh recoveryexit(): disable and drain
An extra buffer reference alone would still let completion append new records after the final truncate-log flush.
Split stopping and draining recovery from freeing its state. Stop all recovery producers and drain completion work before shutting down either local allocator. Keep recovery-state release at its existing later point, so its lifetime relative to other teardown users stays unchanged. The second stop at recoveryexit() is harmless once recovery is disabled.
KASAN report as below:
BUG: KASAN: slab-use-after-free in ocfs2truncatelogneedsflush+0x23d/0x360 Read of size 8 at addr ffff8881093711e8 by task kworker/u16:3/53 CPU: 0 UID: 0 PID: 53 Comm: kworker/u16:3 Not tainted 7.3.0-rc4-next-20260921-pmb-ocfs2-functional-v1+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, archcaps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: ocfs2wq ocfs2completerecovery Call Trace: <TASK> dumpstacklvl+0x93/0xd0 printreport+0xce/0x630 ? ocfs2truncatelogneedsflush+0x23d/0x360 ? srsoaliasreturnthunk+0x5/0xfbef5 ? virtaddrvalid+0x20e/0x420 ? ocfs2truncatelogneedsflush+0x23d/0x360 kasanreport+0xe0/0x110 ? ocfs2truncatelogneedsflush+0x23d/0x360 ocfs2truncatelogneedsflush+0x23d/0x360 ? pfxocfs2truncatelogneedsflush+0x10/0x10 ? pfxdownwrite+0x10/0x10 ocfs2completetruncatelogrecovery+0x315/0x780 ? tracehardirqson+0x18/0x160 ? pfxocfs2completetruncatelogrecovery+0x10/0x10 ? ocfs2completerecovery+0x666/0x11b0 ? srsoaliasreturnthunk+0x5/0xfbef5 ? kfree+0x308/0x580 ocfs2completerecovery+0x676/0x11b0 ? pfxocfs2completerecovery+0x10/0x10 ? reacquireheldlocks+0xdd/0x200 ? processonework+0x7c8/0x1b40 ? srsoaliasreturnthunk+0x5/0xfbef5 ? lockacquire+0x190/0x300 ? pfxautoremovewakefunction+0x10/0x10 ? processonework+0x834/0x1b40 ? srsoaliasreturnthunk+0x5/0xfbef5 ? lockrelease+0xc8/0x290 ? srsoaliasreturnthunk+0x5/0xfbef5 processonework+0x9a8/0x1b40 ? pfxprocessonework+0x10/0x10 ? lockacquire+0x190/0x300 ? lockisheldtype+0x8f/0x100 ? srsoaliasreturnthunk+0x5/0xfbef5 workerthread+0x65c/0xe40 ? srsoaliasreturnthunk+0x5/0xfbef5 ? kthreadparkme+0x177/0x220 ? srsoaliasreturnthunk+0x5/0xfbef5 ? pfxworkerthread+0x10/0x10 kthread+0x351/0x460 ? srsoaliasreturnthunk+0x5/0xfbef5 ? pfxkthread+0x10/0x10 retfromfork+0x659/0x940 ? pfxretfromfork+0x10/0x10 ? srsoaliasreturnthunk+0x5/0xfbef5 ? switchto+0x74f/0xf70 ? pfxkthread+0x10/0x10 retfromforkasm+0x1a/0x30 </TASK> Allocated by task 538: kasansavestack+0x33/0x60 kasan ---truncated---
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
When can this issue be triggered?
The vulnerable sequence occurs during OCFS2 unmount when recovery of another failed node starts after quota recovery has been stopped but before recovery shutdown has disabled and drained all recovery work.
What conditions are needed for exploitation?
An OCFS2 filesystem must be undergoing unmount, and recovery completion work for another failed node must be queued during the shutdown window. That completion can subsequently use the truncate-log buffer after it has been released.
What is the impact of the race?
Recovery completion may access the released osb_tl_bh truncate-log buffer, resulting in a use-after-free condition.
What is the relevant mitigation if an update cannot be applied immediately?
The provided information identifies the issue as an OCFS2 unmount and failed-node recovery race, but does not provide a documented configuration workaround or mitigation.