From: patchwork-bot+netdevbpf@kernel.org
To: Weiming Shi <bestswngs@gmail.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, martin.lau@kernel.org,
ast@kernel.org, ameryhung@gmail.com, leon.hwang@linux.dev,
kees@kernel.org, wangfushuai@baidu.com, menglong8.dong@gmail.com,
netdev@vger.kernel.org, bpf@vger.kernel.org, xmei5@asu.edu
Subject: Re: [PATCH bpf v3] bpf: Fix NULL pointer dereference in bpf_sk_storage_clone and diag paths
Date: Fri, 24 Apr 2026 03:40:08 +0000 [thread overview]
Message-ID: <177700200880.900079.12370704381484059680.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20260422065411.1007737-2-bestswngs@gmail.com>
Hello:
This patch was applied to bpf/bpf.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Tue, 21 Apr 2026 23:54:12 -0700 you wrote:
> bpf_selem_unlink_nofail() sets SDATA(selem)->smap to NULL before
> removing the selem from the storage hlist. A concurrent RCU reader in
> bpf_sk_storage_clone() can observe the selem still on the list with
> smap already NULL, causing a NULL pointer dereference.
>
> general protection fault, probably for non-canonical address 0xdffffc000000000a:
> KASAN: null-ptr-deref in range [0x0000000000000050-0x0000000000000057]
> RIP: 0010:bpf_sk_storage_clone+0x1cd/0xaa0 net/core/bpf_sk_storage.c:174
> Call Trace:
> <IRQ>
> sk_clone+0xfed/0x1980 net/core/sock.c:2591
> inet_csk_clone_lock+0x30/0x760 net/ipv4/inet_connection_sock.c:1222
> tcp_create_openreq_child+0x35/0x2680 net/ipv4/tcp_minisocks.c:571
> tcp_v4_syn_recv_sock+0x123/0xf90 net/ipv4/tcp_ipv4.c:1729
> tcp_check_req+0x8e1/0x2580 include/net/tcp.h:855
> tcp_v4_rcv+0x1845/0x3b80 net/ipv4/tcp_ipv4.c:2347
>
> [...]
Here is the summary with links:
- [bpf,v3] bpf: Fix NULL pointer dereference in bpf_sk_storage_clone and diag paths
https://git.kernel.org/bpf/bpf/c/375e4e33c18d
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-04-24 3:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 6:54 [PATCH bpf v3] bpf: Fix NULL pointer dereference in bpf_sk_storage_clone and diag paths Weiming Shi
2026-04-23 7:38 ` sashiko-bot
2026-04-23 21:44 ` Amery Hung
2026-04-23 21:40 ` Amery Hung
2026-04-24 0:41 ` Martin KaFai Lau
2026-04-24 3:40 ` 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=177700200880.900079.12370704381484059680.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=ameryhung@gmail.com \
--cc=ast@kernel.org \
--cc=bestswngs@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=leon.hwang@linux.dev \
--cc=martin.lau@kernel.org \
--cc=menglong8.dong@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wangfushuai@baidu.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 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.