net: ip6_gre: 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 |
|
≥ 690afc165bb314354667f67157c1a1aea7dc797a · < 03d8843b143ebbbfaf48511922abc6e886575a61| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: ip6_gre: require CAP_NET_ADMIN in the device netns for changelink
ip6gre_changelink() and ip6erspan_changelink() operate 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 both ops on rtnl_dev_link_net_capable() at their top, before any attribute is parsed.
From the CVE record · Linux
The Linux kernel's ip6_gre changelink operations do not check CAP_NET_ADMIN in the tunnel's network namespace. A caller with CAP_NET_ADMIN in the device's namespace, but not the tunnel's, can change the tunnel when those namespaces differ. No user interaction is described.
Administrators running Linux kernels with the affected ip6_gre changelink behavior should check their systems; affected versions are not specified.