From: Jakub Kicinski <kuba@kernel.org>
To: Kangzheng Gu <xiaoguai0992@gmail.com>
Cc: gregkh@linuxfoundation.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
kees@kernel.org, p@1g4.org, netdev@vger.kernel.org,
stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net-shapers: free rollback entries using kfree_rcu
Date: Mon, 30 Mar 2026 18:15:41 -0700 [thread overview]
Message-ID: <20260330181541.5a3c9f73@kernel.org> (raw)
In-Reply-To: <20260328185804.41325-1-xiaoguai0992@gmail.com>
On Sat, 28 Mar 2026 18:58:04 +0000 Kangzheng Gu wrote:
> net_shaper_rollback() removes NET_SHAPER_NOT_VALID entries and frees
> them using kfree(), which can race with net_shaper_nl_get_dumpit() and
> lead to a use-after-free in net_shaper_fill_one().
>
> Use kfree_rcu() instead of kfree() to free rollback entries, since
> net_shaper_nl_get_dumpit() protects shaper access with rcu_read_lock().
If dump can see NOT_VALID entries we have a bigger problem than a UAF
don't you think? :/
next prev parent reply other threads:[~2026-03-31 1:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKvcANOzRwFk0jm4xBfMGVNJrgGhBT8zvb6r49qc=WdB5zP_fg@mail.gmail.com>
2026-03-28 18:58 ` [PATCH] net-shapers: free rollback entries using kfree_rcu Kangzheng Gu
2026-03-31 1:15 ` Jakub Kicinski [this message]
2026-03-31 7:41 ` Kangzheng Gu
2026-04-01 1:33 ` Jakub Kicinski
2026-04-01 11:59 ` Paul Moses
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=20260330181541.5a3c9f73@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p@1g4.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=xiaoguai0992@gmail.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.