diff options
| author | Nikolaos Gkarlis <nickgarlis@gmail.com> | 2026-04-02 20:14:32 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-04-03 15:07:18 -0700 |
| commit | 7b735ef81286007794a227ce2539419479c02a5f (patch) | |
| tree | 9a89ef42171def20bc2a22d5beb6f8bfcac0d59e /tools/testing/vma/include/git@git.tavy.me:linux.git | |
| parent | 1979645e1842cb7017525a61a0e0e0beb924d02a (diff) | |
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.
Fixes: 81adee47dfb6 ("net: Support specifying the network namespace upon device creation.")
Signed-off-by: Nikolaos Gkarlis <nickgarlis@gmail.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20260402181432.4126920-1-nickgarlis@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
