]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: devmem: allow bind-rx from non-init user namespaces
authorBobby Eshleman <bobbyeshleman@meta.com>
Wed, 3 Jun 2026 01:37:31 +0000 (18:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Jun 2026 01:10:31 +0000 (18:10 -0700)
commite302aa3d00fb1bcbc1137a42615b1c54ca51d785
tree3b0a249ffe2721b5c58a132c861dd6c9bf2ed51d
parent9410fb4da2d42a75c0fdbc04c4e74f3a2c42793f
net: devmem: allow bind-rx from non-init user namespaces

NETDEV_CMD_BIND_RX is currently GENL_ADMIN_PERM, which checks
CAP_NET_ADMIN against init userns. With recent container/netkit/ns
support for devmem, other userns/netns use cases come online and require
bind-rx to allow CAP_NET_ADMIN in non-init user ns as well.

Switch the flag to GENL_UNS_ADMIN_PERM to allow bind-rx for
CAP_NET_ADMIN in the netns's owning userns as well.

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20260602-nl-prov-v2-1-ad721142c641@meta.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/netdev.yaml
net/core/netdev-genl-gen.c