Skip to contentSkip to conversation

CVE-2026-99761: batman-adv: stop originator purge worker before freeing TT

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-99761 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.19 with commit 9d31b3ce81683ce3c9fd10afa70892e373b21067 and fixed in 6.12.118 with commit 2f5a6b491fcecc6abb3a2741f5ba5e0c5fd8db5b
	Issue introduced in 3.19 with commit 9d31b3ce81683ce3c9fd10afa70892e373b21067 and fixed in 6.18.64 with commit 318b5a4eb1cecf7a4d5291f5265925119b454eab
	Issue introduced in 3.19 with commit 9d31b3ce81683ce3c9fd10afa70892e373b21067 and fixed in 7.3.5 with commit 310479adf366e73944e0d75cc8ec11e99327dafc
	Issue introduced in 3.19 with commit 9d31b3ce81683ce3c9fd10afa70892e373b21067 and fixed in 7.4-rc2 with commit f89eda5a9ccf82cba06b085b42ebc4886b8dfe9e

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99761

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/batman-adv/main.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/2f5a6b491fcecc6abb3a2741f5ba5e0c5fd8db5b
	https://git.kernel.org/stable/c/318b5a4eb1cecf7a4d5291f5265925119b454eab
	https://git.kernel.org/stable/c/310479adf366e73944e0d75cc8ec11e99327dafc
	https://git.kernel.org/stable/c/f89eda5a9ccf82cba06b085b42ebc4886b8dfe9e