Commit 509da346 authored by Johannes Wiesböck's avatar Johannes Wiesböck Committed by Greg Kroah-Hartman
Browse files

rtnetlink: Allow deleting FDB entries in user namespace



[ Upstream commit bf29555f ]

Creating FDB entries is possible from a non-initial user namespace when
having CAP_NET_ADMIN, yet, when deleting FDB entries, processes receive
an EPERM because the capability is always checked against the initial
user namespace. This restricts the FDB management from unprivileged
containers.

Drop the netlink_capable check in rtnl_fdb_del as it was originally
dropped in c5c35108 and reintroduced in 1690be63 without
intention.

This patch was tested using a container on GyroidOS, where it was
possible to delete FDB entries from an unprivileged user namespace and
private network namespace.

Fixes: 1690be63 ("bridge: Add vlan support to static neighbors")
Reviewed-by: default avatarMichael Weiß <michael.weiss@aisec.fraunhofer.de>
Tested-by: default avatarHarshal Gohel <hg@simonwunderlich.de>
Signed-off-by: default avatarJohannes Wiesböck <johannes.wiesboeck@aisec.fraunhofer.de>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Link: https://patch.msgid.link/20251015201548.319871-1-johannes.wiesboeck@aisec.fraunhofer.de


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4b714092
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment