CVE-2026-99761: batman-adv: stop originator purge worker before freeing TT
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: stop originator purge worker before freeing TT
batadvmeshfree() releases the translation tables via batadvttfree() before batadvoriginatorfree() stops origwork. The purge worker can therefore still run while the TT is torn down. When an originator times out, batadvpurgeorigref() calls batadvttglobaldelorig(), which loads tt.globalhash and walks all buckets while taking their locks:
CPU0 CPU1 batadvttfree() batadvpurgeorig() batadvttglobaldelorig() hash = ...tt.globalhash; batadvttglobaltablefree() batadvhashdestroy(hash); spinlockbh(&hash->listlocks[i]);
Disable origwork at the beginning of batadvmeshfree(), directly after the mesh was marked as deactivating. The second disabledelayedworksync() in batadvoriginatorfree() is harmless because it is free'd anyway.
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 - Compensating control
In batman-adv, disable orig_work at the beginning of batadv_mesh_free(), before freeing the translation tables, so the originator purge worker cannot run while they are being torn down.
Frequently Asked Questions
What systems are exposed to this race condition?
Linux kernel systems using batman-adv are exposed during batman-adv mesh teardown, when the originator purge worker can run after translation tables have begun to be freed.
What condition is needed to trigger the issue?
An originator must time out while mesh teardown is in progress. The purge worker can then call batadv_tt_global_del_orig() and access the global translation-table hash after it has been destroyed.
What is the practical impact of the race?
The worker may walk and lock buckets in a translation-table hash that has already been freed, creating a use-after-free condition during teardown.
What does the fix change?
The fix disables and synchronizes the originator delayed work at the beginning of batadv_mesh_free(), immediately after the mesh is marked deactivating, before translation tables are released.