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. Таким образом, рабочий очиститель может работать, пока TT снесен. batadv_purge_orig_ref() вызывает batadv_tt_global_del_orig(), который загружает tt.global_hash и проходит все ведра, принимая их замки: CPU0 CPU1 batadv_tt_free() batadv_purge_orig() batadv_tt_global_del_orig() хеш ...tt.global_hash; batadv_tt_global_table_free() batadv_hash_destroy(hash; spin_lock_bh(&hash->list_locks[i); Disable orig_work в начале batadv_mesh_free(), сразу после того, как сетка была отмечена как деактивация. Второй disable_delayed_work_sync () в batadv_originator_free () безвреден, потому что он в любом случае свободен.
Показать оригинальное описание (EN)
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.
Характеристики атаки
Последствия
Строка CVSS v3.1