macvlan: fix possible UAF in macvlan_forward_source()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 79cf79abce71eb7dbc40e2f3121048ca5405cb47 · < 6dbead9c7677186f22b7981dd085a0feec1f038e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
macvlan: fix possible UAF in macvlan_forward_source()
Add RCU protection on (struct macvlan_source_entry)->vlan.
Whenever macvlan_hash_del_source() is called, we must clear entry->vlan pointer before RCU grace period starts.
This allows macvlan_forward_source() to skip over entries queued for freeing.
Note that macvlan_dev are already RCU protected, as they are embedded in a standard netdev (netdev_priv(ndev)).
https: //lore.kernel.org/netdev/695fb1e8.050a0220.1c677c.039f.GAE@google.com/T/#u
From the CVE record · Linux
The Linux kernel's macvlan_forward_source() can encounter a use-after-free involving a macvlan source entry's VLAN pointer. The input does not establish what an attacker could do with this flaw or whether exploitation requires network access, local access, authentication, or user interaction.
Engineers running the Linux kernel with macvlan should check whether their kernel includes the fix; affected versions are not specified.