gtp: Destroy device along with udp socket's netns dismantle.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 459aa660eb1d8ce67080da1983bb81d716aa5a69 · < 86f73d4ab2f27deeff22ba9336ad103d94f12ac7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
gtp: Destroy device along with udp socket's netns dismantle.
gtp_newlink() links the device to a list in dev_net(dev) instead of src_net, where a udp tunnel socket is created.
Even when src_net is removed, the device stays alive on dev_net(dev). Then, removing src_net triggers the splat below. [0]
In this example, gtp0 is created in ns2, and the udp socket is created in ns1.
ip netns add ns1 ip netns add ns2 ip -n ns1 link add netns ns2 name gtp0 type gtp role sgsn ip netns del ns1
Let's link the device to the socket's netns instead.
Now, gtp_net_exit_batch_rtnl() needs another netdev iteration to remove all gtp devices in the netns.
From the CVE record · Linux
The Linux kernel GTP driver can leave a device alive after the network namespace containing its UDP socket is removed. A local user who can create GTP devices across network namespaces and remove the socket’s namespace can trigger a kernel reference-tracker warning. The input does not establish whether authentication beyond permission to perform those operations is required.
Engineers running Linux kernels with the GTP driver should check their kernel vendor’s advisory for affected versions.