Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] vxlan, geneve: require CAP_NET_ADMIN in the device netns for changelink
@ 2026-07-15  5:56 Doruk Tan Ozturk
  2026-07-15  5:56 ` [PATCH net 1/2] vxlan: " Doruk Tan Ozturk
  2026-07-15  5:56 ` [PATCH net 2/2] geneve: " Doruk Tan Ozturk
  0 siblings, 2 replies; 6+ messages in thread
From: Doruk Tan Ozturk @ 2026-07-15  5:56 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, andrew+netdev
  Cc: sd, linville, mschiffer, maoyixie.tju, netdev, linux-kernel

The recent series "require CAP_NET_ADMIN in the device netns for
changelink" (8165f7ff57d9..27ccb68e7ccc) added rtnl_dev_link_net_capable()
and gated the eight IP tunnel drivers (ip_gre, ipip, ip_vti, ip6_tunnel,
ip6_gre, ip6_vti, sit, xfrm_interface). VXLAN and GENEVE share the exact
same shape but were not covered: both store the underlay netns sticky at
newlink (vxlan->net / geneve->net) and their changelink() operates on that
netns, while the generic RTM_NEWLINK path only checks CAP_NET_ADMIN against
dev_net(dev). Once such a device is created in or moved to another netns,
a caller privileged in dev_net(dev) but not in the underlay netns can
reconfigure the tunnel's underlay.

This completes that series for the two UDP tunnel drivers that were left
out. Same helper, same placement (top of changelink, before any attribute
is parsed).

Verified on next-20260714 in QEMU with CONFIG_VXLAN=y + CONFIG_USER_NS=y:
an unprivileged user namespace holding CAP_NET_ADMIN only in a child netns
issues an IFLA_INFO_DATA changelink on a vxlan device whose underlay lives
in init_net. Before: returns 0 (reconfigures the init_net underlay).
After: returns -EPERM.

Doruk Tan Ozturk (2):
  vxlan: require CAP_NET_ADMIN in the device netns for changelink
  geneve: require CAP_NET_ADMIN in the device netns for changelink

 drivers/net/geneve.c           | 3 +++
 drivers/net/vxlan/vxlan_core.c | 3 +++
 2 files changed, 6 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH net 1/2] vxlan: require CAP_NET_ADMIN in the device netns for changelink
@ 2026-07-15 12:46 Doruk Tan Ozturk
  0 siblings, 0 replies; 6+ messages in thread
From: Doruk Tan Ozturk @ 2026-07-15 12:46 UTC (permalink / raw)
  To: fmancera
  Cc: davem, edumazet, kuba, pabeni, andrew+netdev, sd, linville,
	mschiffer, maoyixie.tju, netdev, linux-kernel

> It should be:
> Fixes: 8bcdc4f3a20b ("vxlan: add changelink support")

Thanks, agreed. I'll fix both tags in v2 (geneve too, 5b861f6baa3a).

Doruk

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-15 12:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15  5:56 [PATCH net 0/2] vxlan, geneve: require CAP_NET_ADMIN in the device netns for changelink Doruk Tan Ozturk
2026-07-15  5:56 ` [PATCH net 1/2] vxlan: " Doruk Tan Ozturk
2026-07-15 12:36   ` Fernando Fernandez Mancera
2026-07-15  5:56 ` [PATCH net 2/2] geneve: " Doruk Tan Ozturk
2026-07-15 12:36   ` Fernando Fernandez Mancera
  -- strict thread matches above, loose matches on Subject: below --
2026-07-15 12:46 [PATCH net 1/2] vxlan: " Doruk Tan Ozturk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox