Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Jamal Hadi Salim" <jhs@mojatatu.com>, <netdev@vger.kernel.org>
Cc: "Jiri Pirko" <jiri@resnulli.us>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Willem de Bruijn" <willemb@google.com>,
	"Simon Horman" <horms@kernel.org>,
	"Victor Nogueira" <victor@mojatatu.com>,
	"Po Liu" <Po.Liu@nxp.com>, <stable@vger.kernel.org>,
	<syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com>,
	"shaos" <shawnq1@163.com>
Subject: Re: [PATCH net v4 1/3] net/sched: act_gate: bound the cycle time and start time arithmetic
Date: Tue, 24 Nov 2026 19:56:58 +0000	[thread overview]
Message-ID: <DN3PFJ14HKX6.1W8QEBXWGFTHH@gmail.com> (raw)
In-Reply-To: <ACT-WEXM.v4.r0.20261124074514-1@mojatatu.com>

On Tue, Nov 24, 2026 at 06:12 AM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> 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:

  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>

  reply	other threads:[~2026-11-24 19:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 14:12 [PATCH net v4 0/3] net/sched: act_gate: bound the cycle time and refuse schedule entries shorter than 10 us Jamal Hadi Salim
2026-11-24 14:12 ` [PATCH net v4 1/3] net/sched: act_gate: bound the cycle time and start time arithmetic Jamal Hadi Salim
2026-11-24 19:56   ` Alexei Starovoitov [this message]
2026-11-24 14:12 ` [PATCH net v4 2/3] net/sched: act_gate: refuse schedule entries shorter than 10 us Jamal Hadi Salim
2026-11-24 16:12   ` Sebastian Andrzej Siewior
2026-11-24 16:58     ` Jamal Hadi Salim
2026-11-24 17:11       ` Jamal Hadi Salim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN3PFJ14HKX6.1W8QEBXWGFTHH@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=Po.Liu@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shawnq1@163.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+0054fed3dc9085390f51@syzkaller.appspotmail.com \
    --cc=victor@mojatatu.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox