net: sit: 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 |
|
≥ 5e6700b3bf98fe98d630bf9c939ad4c85ce95592 · < 3118e97dae533fb45964b87bbed1801afcff7c65| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: sit: require CAP_NET_ADMIN in the device netns for changelink
ipip6_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 ipip6_changelink() on rtnl_dev_link_net_capable() at its top, before any attribute is parsed. sit was the one tunnel type not covered by the recent series that added this check to the other changelink() handlers.
From the CVE record · Linux
The sit tunnel changelink handler checks CAP_NET_ADMIN in the device's network namespace but not in the tunnel link's namespace. When those namespaces differ, a caller with that capability only in the device's namespace can rewrite a tunnel in the other namespace.
Engineers running Linux kernels with sit tunnel support should check whether their kernel includes the resolved fix; affected versions were not specified.