Re: [PATCH net v4 1/3] net/sched: act_gate: bound the cycle time and start time arithmetic

From
Jamal Hadi Salim <jhs@mojatatu.com>
Date
2026-11-24 23:31:34
Also in
stable
Reply to
Alexei Starovoitov, 2026-11-24
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>
Thread (13 messages) 13 messages, 4 authors, last reply 1d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help