CVE-2026-31692: rtnetlink: add missing netlink_ns_capable() check for peer netns
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
rtnetlink: add missing netlink_ns_capable() check for peer netns
rtnl_newlink() lacks a CAP_NET_ADMIN capability check on the peer network namespace when creating paired devices (veth, vxcan, netkit). This allows an unprivileged user with a user namespace to create interfaces in arbitrary network namespaces, including init_net.
Add a netlink_ns_capable() check for CAP_NET_ADMIN in the peer namespace before allowing device creation to proceed.
The Linux kernel CVE team has assigned CVE-2026-31692 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.33 with commit 81adee47dfb608df3ad0b91d230fb3cef75f0060 and fixed in 6.18.24 with commit 0975b64ffb34560042090a5986c3a02e6c80f36f Issue introduced in 2.6.33 with commit 81adee47dfb608df3ad0b91d230fb3cef75f0060 and fixed in 6.19.14 with commit d04cc16d3624218a5458b2b664ae431f1b3b334d Issue introduced in 2.6.33 with commit 81adee47dfb608df3ad0b91d230fb3cef75f0060 and fixed in 7.0 with commit 7b735ef81286007794a227ce2539419479c02a5f
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-31692
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/core/rtnetlink.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/0975b64ffb34560042090a5986c3a02e6c80f36f https://git.kernel.org/stable/c/d04cc16d3624218a5458b2b664ae431f1b3b334d https://git.kernel.org/stable/c/7b735ef81286007794a227ce2539419479c02a5f