CVE-2026-99552: ocfs2/dlm: drain join handlers before releasing module text
In the Linux kernel, the following vulnerability has been resolved:
ocfs2/dlm: drain join handlers before releasing module text
The code for a registered DLM handler must remain resident until its last invocation finishes. dlmunregisternethandlers() only removes dlmjoinhandlers from the o2net registry. o2nethandlerget() takes a kref on the wrapper, but that reference does not pin ocfs2dlm text. o2netprocessmessage() calls nhfunc after dropping o2nethandlerlock.
With CONFIGOCFS2FSO2CB=m, ocfs2dlm can be loaded independently of ocfs2stacko2cb while nodemanager continues handling messages from a configured, heartbeating peer. If no dependent module or module reference prevents normal unload, the following ordering is possible:
Receive worker Module unload -------------- ------------- o2nethandlerget() take wrapper kref drop handler lock <preempted> dlmexit() unregister handlers release DLM module text call saved nhfunc in released module text
Use o2netunregisterandflushhandlerlist() in the shared DLM unregister helper. It first prevents new lookups, then waits for the ordered o2net workqueue to drain, including a concurrent destruction of that queue. The acquired invocation therefore finishes before dlmexit() returns and the loader releases the callback code. The same helper covers partial registration and dlminit() error unwind before module memory is released.
Skip the drain when the private join-handler list is empty. Early dlminit() failures can reach this helper before any handler has been published. Partial-registration failure also reaches it a second time after the first call has already unregistered and drained the list. Neither case needs to take o2netwqmutex or drain unrelated work. The list is changed only by serialized module init/exit paths; a nonempty list still uses the full unregister-and-flush helper.
Oops report as below:
Oops: int3: 0000 [#1] SMP KASAN NOPTI CPU: 2 UID: 0 PID: 54 Comm: kworker/u16:3 Not tainted 7.3.0-rc4-next-20260921-pmb-ocfs2-functional-v1+ #1 PREEMPT(lazy)
Hardware identification omitted.
Workqueue: o2net o2netrxuntilempty [ocfs2nodemanager] RIP: 0010:0xffffffffc0423871 [Instruction byte dump omitted.]
Register dump omitted.
Call Trace: <TASK> ? o2netrxuntilempty+0x19b1/0x3300 [ocfs2nodemanager] ? pfxo2netrxuntilempty+0x10/0x10 [ocfs2nodemanager] ? lockacquire+0x190/0x300 ? processonework+0x935/0x1b40 ? 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> Modules linked in: ocfs2nodemanager [last unloaded: ocfs2dlm] ---[ end trace 0000000000000000 ]---
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.117 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2