On Tue, Nov 24, 2026 at 2:57 PM Alexei Starovoitov
[off-list ref] wrote:
On Tue, Nov 24, 2026 at 06:12 AM Jamal Hadi Salim [off-list ref] wrote:
quoted
Conditions to recreate the bug:
CONFIG_NET_ACT_GATE=y, and CAP_NET_ADMIN in the initial user namespace:
tc_ctl_action() tests netlink_capable(), which checks init_user_ns, so a
user namespace of its own does not help. iproute2 parses cycle-time as
Well ...
after "unshare -Urn" an unprivileged user can add a dummy device, clsact
and a matchall filter with this gate action.
That check covers RTM_NEWACTION only.
RTM_NEWTFILTER creates the action too:
True - based it on poc i could create; should have checked that code path.
I hope the over-hyper bots dont complain this is "high" and have me
resend to fix the commit log.
cheers,
jamal
rtnetlink_rcv_msg() netlink_net_capable(CAP_NET_ADMIN)
tc_new_tfilter() no check
mall_change()
tcf_exts_validate_ex()
tcf_action_init()
tcf_gate_init()
Acked-by: Alexei Starovoitov <ast@kernel.org>