net: ip_vti: require CAP_NET_ADMIN in the device netns for changelink
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 895de9a3488abcdd186680f0af3cce7f2d4d4a6e · < 9571af2eec8023af9a1671b7f2cd4ab400011724| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ip_vti: require CAP_NET_ADMIN in the device netns for changelink
vti_changelink() operates on at most two netns, dev_net(dev) and the tunnel link netns t->net. They differ once the device is created in or moved to a netns other than the one the request runs in. The rtnl changelink path checks CAP_NET_ADMIN only against dev_net(dev), so a caller privileged there but not in t->net can rewrite a tunnel that lives in t->net.
Gate vti_changelink() on rtnl_dev_link_net_capable() at its top, before any attribute is parsed.
From the CVE record · Linux
The Linux kernel's ip_vti changelink path does not check CAP_NET_ADMIN in the tunnel's network namespace. A local caller with CAP_NET_ADMIN in the device's network namespace, but not the tunnel's, can rewrite the tunnel when those namespaces differ.
Anyone running a Linux kernel with the affected ip_vti changelink code should check their kernel version; affected versions were not provided.