batman-adv: Avoid double-rtnl_lock ELP metric worker
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8c8ecc98f5c65947b0070a24bac11e12e47cc65d · < 2ab9f2531d37775cd79228c1f5d80e6bd08d11d3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: Avoid double-rtnl_lock ELP metric worker
batadv_v_elp_get_throughput() might be called when the RTNL lock is already held. This could be problematic when the work queue item is cancelled via cancel_delayed_work_sync() in batadv_v_elp_iface_disable(). In this case, an rtnl_lock() would cause a deadlock.
To avoid this, rtnl_trylock() was used in this function to skip the retrieval of the ethtool information in case the RTNL lock was already held.
But for cfg80211 interfaces, batadv_get_real_netdev() was called - which also uses rtnl_lock(). The approach for __ethtool_get_link_ksettings() must also be used instead and the lockless version __batadv_get_real_netdev() has to be called.
From the CVE record · Linux
The batman-adv ELP metric worker can attempt to acquire the RTNL lock while it is already held, causing a deadlock when the worker is cancelled. The issue involves cfg80211 interfaces; the input does not describe an attacker-controlled path, authentication requirements, or user interaction.
Engineers running Linux kernels with batman-adv should check whether their kernel is affected; affected versions were not provided.