geneve: Fix use-after-free in geneve_find_dev().
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2d07dc79fe04a43d82a346ced6bbf07bdb523f1b · < da9b0ae47f084014b1e4b3f31f70a0defd047ff3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
geneve: Fix use-after-free in geneve_find_dev().
syzkaller reported a use-after-free in geneve_find_dev() [0] without repro.
geneve_configure() links struct geneve_dev.next to net_generic(net, geneve_net_id)->geneve_list.
The net here could differ from dev_net(dev) if IFLA_NET_NS_PID, IFLA_NET_NS_FD, or IFLA_TARGET_NETNSID is set.
When dev_net(dev) is dismantled, geneve_exit_batch_rtnl() finally calls unregister_netdevice_queue() for each dev in the netns, and later the dev is freed.
However, its geneve_dev.next is still linked to the backend UDP socket netns.
Then, use-after-free will occur when another geneve dev is created in the netns.
From the CVE record · Linux
The Linux kernel's Geneve device lookup can access freed memory when a Geneve device is linked to a different network namespace and its own namespace is dismantled. A local process creating another Geneve device in the backend namespace can trigger the use-after-free; the input does not establish specific authorization requirements.
Engineers running Linux kernels with Geneve support should check their kernel vendor's advisory for affected versions, which are not specified here.