From: Simon Horman <horms@kernel.org>
To: "Jérémy Jean" <Jeremy.Jean@oss.cyber.gouv.fr>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH net v2] net/sched: fix use-after-free in __tcf_action_put()
Date: Sat, 10 Oct 2026 15:51:21 +0100 [thread overview]
Message-ID: <20261010145121.GR83879@horms.kernel.org> (raw)
In-Reply-To: <20261008181348.527035-2-Jeremy.Jean@oss.cyber.gouv.fr>
On Thu, Oct 08, 2026 at 06:13:49PM +0000, Jérémy Jean wrote:
> __tcf_action_put() decrements the reference count before decrementing the
> binding count. Another thread can free the action between these operations,
> causing the binding-count update to access freed memory. KASAN reports it
> as:
>
> BUG: KASAN: slab-use-after-free in __tcf_action_put+0x327/0x340
> Write of size 4 at addr ff11000000d46420 by task tc-put-pause/64
>
> Hold the action IDR mutex across both counter updates and IDR removal,
> keeping cleanup outside the lock.
>
> Fixes: 16af6067392c ("net: sched: implement reference counted action release")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Jérémy Jean <Jeremy.Jean@oss.cyber.gouv.fr>
> ---
>
> Change in v2:
> - Invert the condition of the test.
>
> v1: https://lore.kernel.org/all/20260930211839.620410-2-Jeremy.Jean@oss.cyber.gouv.fr/
Reviewed-by: Simon Horman <horms@kernel.org>
prev parent reply other threads:[~2026-10-10 14:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 18:13 Jérémy Jean
2026-10-10 14:51 ` Simon Horman [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=20261010145121.GR83879@horms.kernel.org \
--to=horms@kernel.org \
--cc=Jeremy.Jean@oss.cyber.gouv.fr \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®