batman-adv: bla: only purge non-released claims
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 23721387c409087fd3b97e274f34d3ddc0970b74 · < b65365d2b1e6095c538d49baeb140dd1c166c1b3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: bla: only purge non-released claims
When batadv_bla_purge_claims() goes through the list of claims, it is only traversing the hash list with an rcu_read_lock(). Due to a potential parallel batadv_claim_put(), it can happen that it encounters a claim which was actually in the process of being released+freed by batadv_claim_release(). In this case, backbone_gw is set to NULL before the delayed RCU kfree is started. Calling batadv_bla_claim_get_backbone_gw() is then no longer allowed because it would cause a NULL-ptr derefence.
To avoid this, only claims with a valid reference counter must be purged. All others are already taken care of.
From the CVE record · Linux
The Linux kernel’s batman-adv BLA claim-purging code can dereference a NULL pointer if a claim is being released in parallel. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with batman-adv should check their versions; affected versions are not specified.