From: "Cen Zhang (Microsoft)" <blbllhy@gmail.com>
To: horms@kernel.org
Cc: AutonomousCodeSecurity@microsoft.com, andrew+netdev@lunn.ch,
blbllhy@gmail.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, kys@microsoft.com, laforge@gnumonks.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
osmocom-net-gprs@lists.osmocom.org, pabeni@redhat.com,
pablo@netfilter.org, tgopinath@linux.microsoft.com,
xmei5@asu.edu
Subject: Re: [PATCH net] gtp: fix NULL pointer dereference in gtp0_handle_echo_resp()
Date: Tue, 25 Aug 2026 00:56:40 -0400 [thread overview]
Message-ID: <20260825045640.39522-1-blbllhy@gmail.com> (raw)
In-Reply-To: <20260819124820.GR265046@horms.kernel.org>
On Wed, Aug 19, 2026 at 01:48:20PM +0100, Simon Horman wrote:
> I don't believe that this is sufficient to address the problem described as
> there is no synchronisation between the reader and writer of sk_created.
>
> I wonder if this might be addressed using smp_store_release/smp_load_acquire.
Thanks. v2 uses smp_store_release()/smp_load_acquire() as suggested.
While reviewing all sk_created access points, we also found a teardown
race in gtp_encap_disable() and a missing RTNL lock in
gtp_genl_send_echo_req(). These are addressed in a new patch 2/2.
Regarding the Sashiko review:
https://sashiko.dev/#/patchset/20260816035205.57966-1-blbllhy@gmail.com
> Could a concurrent RX softirq checking gtp->sk_created without
> smp_load_acquire() still observe it as true while gtp->sk0
> remains NULL?
Addressed in v2 patch 1/2.
> Does the error path in gtp_create_sockets() properly synchronize
> with concurrent RX softirqs? Could this lead to a Use-After-Free?
Independent pre-existing issue.
> Could the KASAN null pointer dereference actually be caused by the
> teardown path? Does this path need synchronization to wait for
> concurrent softirqs before clearing the pointers?
We reproduced this and addressed it with another teardown path issue
in v2 patch 2/2.
> Does modifying the RX SKB in place during an echo response corrupt
> data for concurrent readers (tcpdump)?
Independent pre-existing issue.
Cen
prev parent reply other threads:[~2026-08-25 4:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 3:52 [PATCH net] gtp: fix NULL pointer dereference in gtp0_handle_echo_resp() Cen Zhang (Microsoft)
2026-08-19 12:48 ` Simon Horman
2026-08-25 4:56 ` Cen Zhang (Microsoft) [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=20260825045640.39522-1-blbllhy@gmail.com \
--to=blbllhy@gmail.com \
--cc=AutonomousCodeSecurity@microsoft.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=osmocom-net-gprs@lists.osmocom.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=tgopinath@linux.microsoft.com \
--cc=xmei5@asu.edu \
/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