From: James Chapman <jchapman@katalix.com>
To: bpf@vger.kernel.org, kafai@fb.com
Cc: netdev@vger.kernel.org
Subject: bpf's usage of sk_user_data
Date: Tue, 7 Jul 2020 10:37:30 +0100 [thread overview]
Message-ID: <20200707093730.GC21324@katalix.com> (raw)
I'm investigating a crash found by syzbot which turns out to be caused
by bpf_sk_reuseport_detach assuming ownership of sk_user_data in the
UDP socket destroy path and corrupts metadata of a UDP socket user (l2tp).
Here's the syzbot report:
https://syzkaller.appspot.com/bug?extid=9f092552ba9a5efca5df
I submitted a patch to l2tp to workaround this by having l2tp refuse
to use a UDP socket with SO_REUSEPORT set. But this isn't the right
fix. Can BPF be changed to store its metadata elsewhere such that
other socket users which use sk_user_data can co-exist with BPF?
The email thread discussing this is at:
https://lore.kernel.org/netdev/20200706.124536.774178117550894539.davem@davemloft.net/
next reply other threads:[~2020-07-07 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 9:37 James Chapman [this message]
2020-07-07 18:32 ` bpf's usage of sk_user_data Martin KaFai Lau
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=20200707093730.GC21324@katalix.com \
--to=jchapman@katalix.com \
--cc=bpf@vger.kernel.org \
--cc=kafai@fb.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