CVE-2026-72123: can: bcm: defer rx_op deallocation to workqueue to fix thrtimer UAF
In the Linux kernel, the following vulnerability has been resolved:
can: bcm: defer rxop deallocation to workqueue to fix thrtimer UAF
Commit f1b4e32aca08 ("can: bcm: use callrcu() instead of costly synchronizercu()") replaced synchronizercu() in bcmdeleterxop() with callrcu() and introduced the RXNOAUTOTIMER flag.
However, this flag check was omitted for thrtimer in the packet rx fast-path. During BCM RX operation teardown, a concurrent RCU reader (bcmrxhandler) can race and re-arm thrtimer via bcmrxupdateandsend() after callrcu() has been scheduled. Once the RCU grace period elapses, bcmop is freed. The subsequently firing thrtimer then dereferences the deallocated op, causing a UAF.
Adding flag checks to the rx fast-path (bcmrxupdateandsend) does not fully close the TOCTOU race and introduces latency for every CAN frame. Conversely, calling hrtimercancel() directly inside the RCU callback (softirq context) is fatal as hrtimercancel() can sleep, triggering a "scheduling while atomic" panic.
Resolve this by deferring the timer cancellation and memory free to a dedicated unbound workqueue (bcmwq). The RCU callback now queues a work item to bcmwq, which safely cancels both timers and deallocates memory in sleepable process context. A dedicated workqueue is used to prevent system-wide WQ saturation and is cleanly flushed/destroyed on module unload to avoid rmmod page faults.
Since the deferred work can now outlive the calling context by an unbounded amount, also take a reference on op->sk when it is assigned and drop it only once the deferred work has cancelled both timers, so a socket can no longer be freed out from under a still-armed timer whose callback (bcmsendtouser()) dereferences op->sk.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux kernelto a version that resolves this vulnerability.Patch f1b4e32aca08 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch bcm: defer rx_op deallocation to workqueue to fix thrtimer UAF - Configuration
Add/ensure RX_NO_AUTOTIMER flag is used so the rx fast-path does not re-arm the thrtimer after call_rcu() has been scheduled.
can: bcm (driver) RX_NO_AUTOTIMER = set/used - Configuration
In bcm_delete_rx_op(), replace synchronize_rcu() with call_rcu() as described (and defer rx_op deallocation accordingly) to avoid hrtimer_cancel() being called in a context where it can sleep.
can: bcm (driver) RCU synchronization method = call_rcu() - Configuration
Defer both thrtimer cancellation and rx_op memory deallocation to a dedicated unbound workqueue (bcm_wq), scheduled from the RCU callback, so the timer cannot fire after op has been freed.
can: bcm (driver) Timer cancellation and memory free context = dedicated unbound workqueue bcm_wq - Operational
On module unload, cleanly flush/destroy the bcm_wq workqueue to prevent rmmod page faults and ensure no deferred work outlives module teardown.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-72123?
CVE-2026-72123 has a risk level of 42.
What type of vulnerability is CVE-2026-72123?
CVE-2026-72123 is a use-after-free (UAF) vulnerability in the Linux kernel's CAN BCM module.
How do I fix CVE-2026-72123?
To fix CVE-2026-72123, you should update your Linux kernel to the version that contains the patch for this vulnerability.
What systems are affected by CVE-2026-72123?
CVE-2026-72123 affects systems running vulnerable versions of the Linux kernel that implement the CAN BCM module.
When was CVE-2026-72123 published?
CVE-2026-72123 was published on August 15, 2026.