pfcp: Destroy device along with udp socket's netns dismantle.
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pfcp: Destroy device along with udp socket's netns dismantle.
pfcp_newlink() links the device to a list in dev_net(dev) instead of net, where a udp tunnel socket is created.
Even when net is removed, the device stays alive on dev_net(dev). Then, removing net triggers the splat below. [0]
In this example, pfcp0 is created in ns2, but the udp socket is created in ns1.
ip netns add ns1 ip netns add ns2 ip -n ns1 link add netns ns2 name pfcp0 type pfcp ip netns del ns1
Let's link the device to the socket's netns instead.
Now, pfcp_net_exit() needs another netdev iteration to remove all pfcp devices in the netns.
From the CVE record · Linux
The Linux kernel’s PFCP driver can leave a device alive after the network namespace containing its UDP socket is removed. A local user able to create PFCP devices across network namespaces and delete a namespace can trigger a kernel reference-tracker warning; the input does not establish a further impact.
Engineers running Linux kernels with the PFCP driver should check whether their kernel includes the fix; affected version ranges are not provided.