From: John Fastabend <john.fastabend@gmail.com>
To: kuniyu@amazon.com, edumazet@google.com, jakub@cloudflare.com
Cc: john.fastabend@gmail.com, bpf@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH bpf 0/2] bpf fix for unconnect af_unix socket
Date: Thu, 30 Nov 2023 19:23:14 -0800 [thread overview]
Message-ID: <20231201032316.183845-1-john.fastabend@gmail.com> (raw)
Eric reported a syzbot splat from a null ptr deref from recent fix to
resolve a use-after-free with af-unix stream sockets and BPF sockmap
usage.
The issue is I missed is we allow unconnected af_unix STREAM sockets to
be added to the sockmap. Fix this by blocking unconnected sockets.
John Fastabend (2):
bpf: syzkaller found null ptr deref in unix_bpf proto add
bpf: sockmap, test for unconnected af_unix sock
include/net/sock.h | 5 +++
net/core/sock_map.c | 2 ++
.../selftests/bpf/prog_tests/sockmap_basic.c | 34 +++++++++++++++++++
3 files changed, 41 insertions(+)
--
2.33.0
next reply other threads:[~2023-12-01 3:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 3:23 John Fastabend [this message]
2023-12-01 3:23 ` [PATCH bpf 1/2] bpf: syzkaller found null ptr deref in unix_bpf proto add John Fastabend
2023-12-01 9:24 ` Eric Dumazet
2023-12-01 9:35 ` Jakub Sitnicki
2023-12-01 15:36 ` John Fastabend
2023-12-01 3:23 ` [PATCH bpf 2/2] bpf: sockmap, test for unconnected af_unix sock John Fastabend
2023-12-01 9:39 ` Jakub Sitnicki
2023-12-01 16:35 ` John Fastabend
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=20231201032316.183845-1-john.fastabend@gmail.com \
--to=john.fastabend@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=edumazet@google.com \
--cc=jakub@cloudflare.com \
--cc=kuniyu@amazon.com \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).