batman-adv: mcast: fix use-after-free in orig_node RCU release
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ab49886e3da73b6b35ece21006e191910427bb30 · < 8a3707653ab658e082ccd992e92594e01b09a3fc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: mcast: fix use-after-free in orig_node RCU release
batadv_mcast_purge_orig() removes entries from RCU-protected hlists but does not wait for an RCU grace period before returning. Concurrent RCU readers may still accesses references to those entries at the point of removal. RCU-protected readers trying to operate on entries like orig->mcast_want_all_ipv6_node will then access already freed memory.
Fix this by moving batadv_mcast_purge_orig() to batadv_orig_node_release(), just before the call_rcu() invocation. This ensures RCU readers that were active at purge time have drained before the orig_node memory is reclaimed.
From the CVE record · Linux
The Linux kernel’s batman-adv multicast code can free entries while concurrent RCU readers still use them, causing a use-after-free. The input does not specify how an attacker could trigger this or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with batman-adv should check their versions; affected versions are not specified.