netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Andrii Nakryiko <andriin@fb.com>, Dmitry Vyukov <dvyukov@google.com>
Cc: syzbot <syzbot+3610d489778b57cc8031@syzkaller.appspotmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	David Miller <davem@davemloft.net>,
	guro@fb.com, kuba@kernel.org,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>,
	syzkaller-bugs <syzkaller-bugs@googlegroups.com>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Subject: Re: general protection fault in inet_unhash
Date: Fri, 29 May 2020 11:09:45 -0700	[thread overview]
Message-ID: <0d25f022-e68d-6a46-e0ad-813b56c66a88@gmail.com> (raw)
In-Reply-To: <b1b315b5-4b1f-efa1-b137-90732fa3f606@gmail.com>



On 5/29/20 10:32 AM, Eric Dumazet wrote:

> L2TP seems to use sk->sk_node to insert sockets into l2tp_ip_table, _and_ uses l2tp_ip_prot.unhash == inet_unhash
> 
> So if/when BPF_CGROUP_RUN_PROG_INET_SOCK(sk) returns an error and inet_create() calls sk_common_release()
> bad things happen, because inet_unhash() expects a valid hashinfo pointer.
> 
> I guess the following patch should fix this.
> 
> Bug has been there forever, but only BPF_CGROUP_RUN_PROG_INET_SOCK(sk) could trigger it.
>

Official submission : https://patchwork.ozlabs.org/project/netdev/patch/20200529180838.107255-1-edumazet@google.com/


  reply	other threads:[~2020-05-29 18:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 16:44 general protection fault in inet_unhash syzbot
2020-05-28 21:01 ` Andrii Nakryiko
2020-05-28 21:27   ` Eric Dumazet
2020-05-29  6:29     ` Andrii Nakryiko
2020-05-29  6:23   ` Dmitry Vyukov
2020-05-29  6:32     ` Andrii Nakryiko
2020-05-29  6:38       ` Dmitry Vyukov
2020-05-29 17:32       ` Eric Dumazet
2020-05-29 18:09         ` Eric Dumazet [this message]
2020-05-29 22:38         ` Andrii Nakryiko

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=0d25f022-e68d-6a46-e0ad-813b56c66a88@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=guro@fb.com \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+3610d489778b57cc8031@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=yoshfuji@linux-ipv6.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).