Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2981625imm; Sun, 3 Jun 2018 16:38:21 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJaN4LRmp5jbnoHu4oMheGh1t85rg0Lu0fB7eIujbyQ23rrHF9N5Vqh3ghAJ3SgSkZUakF X-Received: by 2002:a63:740c:: with SMTP id p12-v6mr15353278pgc.259.1528069101319; Sun, 03 Jun 2018 16:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528069101; cv=none; d=google.com; s=arc-20160816; b=OZVKk0vV2IlFAtosYqZ2cQVoT0U072hfP4L8H8MCArt30RGc1+iMa4++oqwPyhxztu lh5/jhopIL7PY5wJ4e1FHWDHev7qveAimFx3vt32F5bhQhw1OHf1WgGjfw2BCGpv3TXV EKoOhIMHaDimL4EeaPxHwl2vIVyNYFsKsAoHnABb1lX6IZGRr6LC7R/vWGZQqyEM0/eh 7Thc48lVxgnuk/5GGrsDwsiilq/BhCB6Df+VGbsz8jIeI7NSn4xdjB3WN7KDz+07Ov9p vRDs36tfhoXs2r3LsGOWsDnTznVaXZk0l+32K4z2egcr2GoZtvozstNDH3WTSqPUauy0 OWcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:subject:message-id:date :mime-version:arc-authentication-results; bh=MorvczZUw4UWuQ/5bLwWKXWdESdPGl1ZFS/PAyV2Eis=; b=jH9858M3ox1/BMIpIZcnLeqPR7AFlen2Ky+GD+BX+lTmnxXN9tbaklB8roRgUsZuuZ v5QQpAbNWupS0vHV5mVT2zvtmLtAnURZhBd4rauXfYT6kV9wf6Zh6E1i5ZvntEwOKa6H QuCHk0ky/dsUOcfaOIq9r2t/iwROgNRDicPsYA7oODR4f2P9KBNAooXdMi8EWNKyAJA+ DrYEC5+1Lu3N/l7abm5lNfAvXsePzg+5btOPc1oKFb7VGiK8ebQaq6eDwbZV4RNGH/r5 CF5QHcxbcBNDlgqPbkHrtdCQRtQc85hk9QPf/ikht0NoMhXbWUuAieO1e+q421kkR5iI x1Xw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g83-v6si22184222pfg.225.2018.06.03.16.38.06; Sun, 03 Jun 2018 16:38:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbeFCXgj (ORCPT + 99 others); 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 Received: by mail-it0-f71.google.com with SMTP id c7-v6so6332261itd.7 for ; Sun, 03 Jun 2018 16:36:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=MorvczZUw4UWuQ/5bLwWKXWdESdPGl1ZFS/PAyV2Eis=; b=WUjaOKg7QNG0QLCWTneYt99vtYyDJaApz8wwT2InxGyoZ7Fq+Ku6to/5V23sSOmAF6 uKL4g1AkxTp7jkfYqd239IRCij8Nzy1G63rfa/rNDK9gfO4hPiWCUq9XT2Ayuu5UzrPq wAwqJzCZ3V2x2VxP8jBF64Uq4yQehGGjlq8sAlEk0ZX+0Y85NScOYCPHzT0N7lGB3DXA 2YAvDIOz2LjCkLRPH4lRhKWhXQdR1oD+Nm96zd/INVTdkZwkirLIsfdlBB2SeZGReUCi JGG0L14o/WI3xTEIwcRA1pZa+jXnvsS+3RBVWCqRHawAgyotmdOY3+YgpepLQDPQa7fq LTjw== X-Gm-Message-State: APt69E0KWJ5Nix6kcWs/sJyTgv3DgNJ1Oge/ueYMF4XYxFb2gzoXAY0F H89JZ2oRfzYV8296xys73T5RL92sALlm+/ujNFY9YmPuY0Qv MIME-Version: 1.0 X-Received: by 2002:a24:a141:: with SMTP id n1-v6mr9233667iti.35.1528068962953; Sun, 03 Jun 2018 16:36:02 -0700 (PDT) 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 Precedence: bulk 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