From: patchwork-bot+netdevbpf@kernel.org
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
victor@mojatatu.com, kylebot@openai.com, jiri@resnulli.us,
vladbu@nvidia.com, linux-kernel@vger.kernel.org,
security@kernel.org, stable@kernel.org,
syzbot@syzkaller.appspotmail.com
Subject: Re: [PATCH net v2 1/1] net/sched: act_api: use RCU with deferred freeing for action lifecycle
Date: Tue, 02 Jun 2026 00:00:09 +0000 [thread overview]
Message-ID: <178035840972.174748.574168539743805573.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20260531160812.68020-1-jhs@mojatatu.com>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 31 May 2026 12:08:12 -0400 you wrote:
> When NEWTFILTER and DELFILTER are run concurrently it is possible to create a
> race with an associated action.
>
> Let's illustrate with CPU0 running NEWTFILTER and CPU1 running DELFILTER:
>
> 0: mutex_lock() <-- holds the idr lock
> 0: rcu_read_lock()
> 0: p = idr_find(idr, index) <-- action p is valid (RCU protects IDR)
> 0: mutex_unlock() <-- releases the idr lock
> 1: refcount_dec_and_mutex_lock() <-- refcnt 1->0, mutex held
> 1: idr_remove(idr, index) <-- Action removed from IDR
> 1: mutex_unlock() <-- mutex released allowing us to delete the action
> 1: tcf_action_cleanup(p); kfree(p) <-- Kfrees p immediately, no deferral
> 0: refcount_inc_not_zero(&p->tcfa_refcnt) <-- ouch, UAF p points to freed memory
>
> [...]
Here is the summary with links:
- [net,v2,1/1] net/sched: act_api: use RCU with deferred freeing for action lifecycle
https://git.kernel.org/netdev/net/c/5057e1aca011
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-06-02 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 16:08 [PATCH net v2 1/1] net/sched: act_api: use RCU with deferred freeing for action lifecycle Jamal Hadi Salim
2026-05-31 19:14 ` Kyle Zeng
2026-06-01 15:15 ` Pedro Tammela
2026-06-01 15:21 ` Eric Dumazet
2026-06-01 17:43 ` Victor Nogueira
2026-06-02 0:00 ` patchwork-bot+netdevbpf [this message]
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=178035840972.174748.574168539743805573.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=kylebot@openai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=security@kernel.org \
--cc=stable@kernel.org \
--cc=syzbot@syzkaller.appspotmail.com \
--cc=victor@mojatatu.com \
--cc=vladbu@nvidia.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