From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751818AbeFCXgj (ORCPT ); Sun, 3 Jun 2018 19:36:39 -0400 Received: from mail-it0-f71.google.com ([209.85.214.71]:42222 "EHLO mail-it0-f71.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751412AbeFCXgD (ORCPT ); Sun, 3 Jun 2018 19:36:03 -0400 X-Google-Smtp-Source: ADUXVKI+d/eQG8+DEtUohmMbodKmy9OsH6vkkek8xPILMda9pzEJaPXqy/ikLUn6adGaWoDSRFHnFCQ55qpcLUyEXupw6es22vtL MIME-Version: 1.0 Date: Sun, 03 Jun 2018 16:36:02 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000bab429056dc547be@google.com> Subject: KASAN: use-after-free Read in skb_ensure_writable From: syzbot To: ast@kernel.org, daniel@iogearbox.net, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following crash on: HEAD commit: bcece5dc40b9 bpf: Change bpf_fib_lookup to return -EAFNOSU.. git tree: bpf-next console output: https://syzkaller.appspot.com/x/log.txt?x=10ee76b7800000 kernel config: https://syzkaller.appspot.com/x/.config?x=e4078980b886800c dashboard link: https://syzkaller.appspot.com/bug?extid=c8504affd4fdd0c1b626 compiler: gcc (GCC) 8.0.1 20180413 (experimental) syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=10d926df800000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1778c26f800000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+c8504affd4fdd0c1b626@syzkaller.appspotmail.com random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) random: sshd: uninitialized urandom read (32 bytes read) ================================================================== BUG: KASAN: use-after-free in pskb_may_pull include/linux/skbuff.h:2108 [inline] BUG: KASAN: use-after-free in skb_ensure_writable+0x554/0x620 net/core/skbuff.c:5118 Read of size 4 at addr ffff8801b0b40fc0 by task syz-executor258/4479 CPU: 0 PID: 4479 Comm: syz-executor258 Not tainted 4.17.0-rc6+ #29 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 pskb_may_pull include/linux/skbuff.h:2108 [inline] skb_ensure_writable+0x554/0x620 net/core/skbuff.c:5118 __bpf_try_make_writable net/core/filter.c:1606 [inline] bpf_try_make_writable net/core/filter.c:1612 [inline] ____bpf_l3_csum_replace net/core/filter.c:1774 [inline] bpf_l3_csum_replace+0x8c/0x4d0 net/core/filter.c:1765 The buggy address belongs to the page: page:ffffea0006c2d000 count:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x2fffc0000000000() raw: 02fffc0000000000 0000000000000000 0000000000000000 00000000ffffffff raw: ffffea00075ea760 ffffea0006c39660 ffff8801b5848738 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b0b40e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8801b0b40f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff > ffff8801b0b40f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8801b0b41000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801b0b41080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with syzbot. syzbot can test patches for this bug, for details see: https://goo.gl/tpsmEJ#testing-patches