CVE-2026-99761 in Linuxinfo

Summary

by MITRE • 11/20/2026

In the Linux kernel, the following vulnerability has been resolved:

batman-adv: stop originator purge worker before freeing TT

batadv_mesh_free() releases the translation tables via batadv_tt_free() before batadv_originator_free() stops orig_work. The purge worker can therefore still run while the TT is torn down. When an originator times out, batadv_purge_orig_ref() calls batadv_tt_global_del_orig(), which loads tt.global_hash and walks all buckets while taking their locks:

CPU0 CPU1 batadv_tt_free() batadv_purge_orig() batadv_tt_global_del_orig() hash = ...tt.global_hash; batadv_tt_global_table_free() batadv_hash_destroy(hash); spin_lock_bh(&hash->list_locks[i]);

Disable orig_work at the beginning of batadv_mesh_free(), directly after the mesh was marked as deactivating. The second disable_delayed_work_sync() in batadv_originator_free() is harmless because it is free'd anyway.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/22/2026

The Linux kernel vulnerability identified within the BATMAN-ADV module represents a critical race condition arising from improper synchronization during resource teardown, specifically involving translation table management and originator purge operations. This flaw falls under CWE-362, which describes concurrent execution issues where shared resources are accessed without adequate locking or ordering guarantees. The core technical deficiency lies in the sequence of function calls within batadv_mesh_free(), a routine responsible for cleaning up mesh network state upon interface removal or shutdown. In the flawed implementation, the translation tables were released via batadv_tt_free() before the originator purge worker was halted through batadv_originator_free(). This ordering error created a window where the kernel could free memory structures that background workers might still attempt to access, leading to potential use-after-free scenarios and system instability.

The operational impact of this vulnerability is severe, as it can lead to kernel panics or undefined behavior when an originator times out during the shutdown process. Specifically, batadv_purge_orig_ref() invokes batadv_tt_global_del_orig(), which attempts to load tt.global_hash and iterate through all buckets while acquiring their associated locks. However, because CPU0 is executing batadv_tt_free() and calling hash_destroy on the same global hash table that CPU1’s purge worker is trying to lock via spin_lock_bh(&hash->list_locks[i]), a race condition occurs. The memory backing these data structures may be deallocated while still being referenced by the running workqueue, resulting in invalid memory access attempts. This can cause immediate system crashes or subtle corruption of network state that might manifest later as connectivity failures or security bypasses depending on how the corrupted memory is interpreted by subsequent kernel operations.

From a defensive perspective, this vulnerability highlights the importance of strict ordering in resource cleanup sequences within asynchronous kernel environments. The recommended mitigation involves disabling the originator work queue at the very beginning of batadv_mesh_free(), immediately after marking the mesh as deactivating. This ensures that no new purge tasks are scheduled and existing ones complete before any translation table memory is freed. By calling disable_delayed_work_sync() early in the teardown process, the kernel guarantees that all pending operations on tt.global_hash have finished executing before batadv_tt_free() proceeds to release those resources. Although a second call to disable delayed work inside batadv_originator_free() remains harmless due to subsequent deallocation, its presence does not mitigate the race condition if placed after memory freeing steps.

This issue aligns with broader principles found in CWE-416 regarding use-after-free vulnerabilities and emphasizes best practices for handling concurrent access to shared kernel data structures. Security analysts should verify that patch updates are applied promptly to affected Linux distributions, as unpatched systems remain susceptible to denial-of-service conditions triggered by rapid interface cycling or specific timing sequences during mesh network teardowns. Developers reviewing similar code paths in other networking subsystems should audit their own resource cleanup routines for analogous ordering flaws where background workers might outlive the data structures they manipulate.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00168

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!