From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: KASAN: use-after-free Write in bpf_tcp_close Date: Mon, 2 Jul 2018 11:55:36 -0700 Message-ID: References: <000000000000cb4149056d3587f5@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit To: syzbot , ast@kernel.org, daniel@iogearbox.net, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com Return-path: Received: from mail-it0-f68.google.com ([209.85.214.68]:33726 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753263AbeGBS4v (ORCPT ); Mon, 2 Jul 2018 14:56:51 -0400 Received: by mail-it0-f68.google.com with SMTP id y124-v6so1590760itc.0 for ; Mon, 02 Jul 2018 11:56:50 -0700 (PDT) In-Reply-To: <000000000000cb4149056d3587f5@google.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 05/27/2018 01:06 PM, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:    ff4fb475cea8 Merge branch 'btf-uapi-cleanups' > git tree:       bpf-next > console output: https://syzkaller.appspot.com/x/log.txt?x=12b3d577800000 > kernel config:  https://syzkaller.appspot.com/x/.config?x=b632d8e2c2ab2c1 > dashboard link: https://syzkaller.appspot.com/bug?extid=31025a5f3f7650081204 > compiler:       gcc (GCC) 8.0.1 20180413 (experimental) > syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=109a2f37800000 > C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=171a727b800000 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+31025a5f3f7650081204@syzkaller.appspotmail.com > > ================================================================== > BUG: KASAN: use-after-free in cmpxchg_size include/asm-generic/atomic-instrumented.h:355 [inline] > BUG: KASAN: use-after-free in bpf_tcp_close+0x6f5/0xf80 kernel/bpf/sockmap.c:265 > Write of size 8 at addr ffff8801ca277680 by task syz-executor749/9723 #syz fix: bpf: sockhash fix omitted bucket lock in sock_close