xfrm: xfrm_interface: 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 |
|
≥ f203b76d78092faf248db3f851840fbecf80b40e · < 8ca2a19a987a7d1cb4c916ed9723a1c6993b4276| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
xfrm: xfrm_interface: require CAP_NET_ADMIN in the device netns for changelink
xfrmi_changelink() operates on at most two netns, dev_net(dev) and the interface link netns xi->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 xi->net can rewrite an interface that lives in xi->net.
Gate xfrmi_changelink() on rtnl_dev_link_net_capable() at its top, before any attribute is parsed.
From the CVE record · Linux
The Linux kernel’s xfrm_interface changelink path did not require CAP_NET_ADMIN in the interface’s link network namespace. A local caller with CAP_NET_ADMIN in the device’s network namespace, but not the interface’s link namespace, could rewrite the interface when those namespaces differ.
Engineers running Linux kernels with xfrm_interface should check whether their kernel includes the fix; affected versions were not specified.