From: Jakub Kicinski <kuba@kernel.org>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: netdev@vger.kernel.org, stable@vger.kernel.org, vega@nebusec.ai,
Victor Nogueira <victor@mojatatu.com>,
Davide Caratti <dcaratti@redhat.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net] net/sched: act_api: fix TOCTOU NULL deref on a->goto_chain
Date: Tue, 11 Aug 2026 08:32:06 -0700 [thread overview]
Message-ID: <20260811083206.1511f344@kernel.org> (raw)
In-Reply-To: <CAM0EoMmQi03B+t8MyUsXp6-QOcOWRJvbji2etp9jjV1gU5V=XQ@mail.gmail.com>
On Tue, 11 Aug 2026 06:43:32 -0400 Jamal Hadi Salim wrote:
> On Mon, Aug 10, 2026 at 7:45 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Sun, 9 Aug 2026 05:09:28 -0400 Jamal Hadi Salim wrote:
> > > tcf_action_exec() handles TC_ACT_GOTO_CHAIN by first checking
> > > rcu_access_pointer(a->goto_chain) and then calling
> > > tcf_action_goto_chain_exec(), which does a second, independent
> > > rcu_dereference_bh(a->goto_chain) read and immediately dereferences
> > > chain->filter_chain. A concurrent tcf_action_set_ctrlact() (e.g. the gact
> > > replace path) can clear a->goto_chain between the two reads, so the second
> > > read returns NULL and tcf_action_goto_chain_exec() dereferences NULL.
> >
> > FWIW *shiko suggests another tweak but looks orthogonal, LMK if you
> > disagree:
> >
> > https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260809090928.868186-1-jhs@mojatatu.com
> >
> > (the patch is "too fresh" for me to apply right now anyway)
>
> The concern is valid but pre-existing and orthogonal to this patch
> (and a lot less severe than the posted fix)
> I had this discussion with Paolo: When the sashikos raise a concern on
> "pre-existing" issues, what should be the reaction?
> In general the conclusion was to follow up later if worth it; however,
> sometimes we need to make a judgement call - if the pointed to issue
> is serious (and yes, the AI bots are now reading what Sashikos are
> saying and constructing bug reports) then a v2 is needed.
> In this case, I was planning to follow up. I will start more actively
> looking at sashiko reports and analyzing if worth a followup or a v2.
> I dont know how to do these pw signals, but in case i see it as "needs
> v2" it won't be worth waiting for one of you guys to comment.
Right, I was hoping my question was clear enough. I don't think v2 was
needed here either. But we had time to confirm...
> Do we need a written policy somewhere?
The only written policy should be that everyone who asks for a written
policy in this rapidly changing environment owes maintainers a beer :)
More seriously I tried to float two written policies recently - for net
vs net-next and requirements for information in fixes. And each time
there was a long discussion and questions. So y'all need to either
stop making written policies so painful, or stop asking for the
policies. *%$#.
next prev parent reply other threads:[~2026-08-11 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 9:09 [PATCH net] net/sched: act_api: fix TOCTOU NULL deref on a->goto_chain Jamal Hadi Salim
2026-08-10 7:57 ` Davide Caratti
2026-08-10 23:45 ` Jakub Kicinski
2026-08-11 10:43 ` Jamal Hadi Salim
2026-08-11 15:32 ` Jakub Kicinski [this message]
2026-08-12 1:30 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2026-08-09 9:07 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=20260811083206.1511f344@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=dcaratti@redhat.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=vega@nebusec.ai \
--cc=victor@mojatatu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.