Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4926256imm; Sun, 26 Aug 2018 06:51:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbqXJ2nSNJ4LgqX6CRwU6KCo3UXgPrX6JdBx48rE7ABhB6OWm9alpkF7c44U9x4+/Bp9tFN X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr8710539pgh.28.1535291484621; Sun, 26 Aug 2018 06:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535291484; cv=none; d=google.com; s=arc-20160816; b=B7dne8Sy9AjIQpGNsAG9P0ZgV7xESjCQFsNXFQZ62FUudOeOiJ9Bbf8r2OZK+a223g qedHVuKY1+LzW6OJtH6FyyR+BI7TmH0o9a+qGLYrkDbc2vL0FulPNnhDzGUwTM21DuSc ag5Yjfu4nr+XbpZWpd5l2Mt4IJABD66s2wHNEZYPa9dS1IeefwQpiV/tg2JOsVLJOXyv XGyiCQa/VGDkgt6rxhneDbGHJRFX5Dq8ooXzwZF51lFkMJw4SxY/nuDV0rLMd8U2UjyK au/Kd0H37KVZVyNKXgKJsl7P1OSkF6yREZKlegCE3VGh9V0EyzIH/kSKMG97mfzVC3zQ rRMA== 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=wVcK1679bOTmxcD6z0jsUQj6zJ1j5aFY4Rf9zVSkwLE=; b=d4deILGmSZ+nKYWDm/R/9q3/kxm2R+Cn+8x+66+n5F7rga1PoIRUShscsAZcXUWxwE GwJfKU03LtacMXzHu4g+5troFPLZKrIPJGRSOFzokR1b/7Z7CGmAvPiPxBABll9lmujo VUhxtSkApLp+veUfvtoXmSO5u1DhUv29GiqRcDblvKeB6euqKfdHud8/uwfTI8l9ykqk 2U3TWrA6HNZNqm3yy2wgD+bBAoZKlzGGtZm7Lq5CA/9Ugal6U90OlVjCHsUAeQE8TJrx T3DlViVn1k2oOYHEi7ILqKIs2TiOyJ+U2snVRgveQNPt32zByTkx7pPYQLuMWqecPdX6 arJQ== 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 i6-v6si8063810pgk.269.2018.08.26.06.51.08; Sun, 26 Aug 2018 06:51:24 -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 S1726995AbeHZRcl (ORCPT + 99 others); Sun, 26 Aug 2018 13:32:41 -0400 Received: from mail-io0-f199.google.com ([209.85.223.199]:43407 "EHLO mail-io0-f199.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbeHZRcl (ORCPT ); Sun, 26 Aug 2018 13:32:41 -0400 Received: by mail-io0-f199.google.com with SMTP id w19-v6so11672375ioa.10 for ; Sun, 26 Aug 2018 06:50: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=wVcK1679bOTmxcD6z0jsUQj6zJ1j5aFY4Rf9zVSkwLE=; b=RznTeqySsn3MXLhllGtpskA+MAcoa0miQO4WBWIgZ4+gD719Iyues46Sw6EgerxFj1 u2D15BDENSo2evcpxme8UaaYm/x8WRu9odM/2QCCrkvGGmmxCpv/6EGRWu3lJHfEP6vT GzWYvPJXXPCSiZ/HKJPr37OC5Bl6QBKNEf/vSKJ6/TFyCeBHXOzgzOQSCut0gPv6vOm4 x+vn+2VVH4IInUL+TsH+4NfHRR290LdwoHdY1cbWVs0FrgVJTOWNlr50TWV/w+n8r2kZ sb8g0sYsaj83twvQdlpPUCcMlu8d2+9L/ShMcmrbl88QXn3RsB58KgKbKUd60+tWH2BX bm9Q== X-Gm-Message-State: APzg51DrCLG95CqZshnU1UzmsZe8iQkTLy5dpgmXRUjXoC1GNYLJLzTs UmhBa6ZWRtK+IK0xm6o2gslBtNtuqn3bq9jCdOIaYyKCH5rT MIME-Version: 1.0 X-Received: by 2002:a02:8c38:: with SMTP id l53-v6mr4054601jak.53.1535291402703; Sun, 26 Aug 2018 06:50:02 -0700 (PDT) Date: Sun, 26 Aug 2018 06:50:02 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000af648b057456e234@google.com> Subject: KASAN: invalid-free in p9stat_free From: syzbot To: asmadeus@codewreck.org, davem@davemloft.net, ericvh@gmail.com, linux-kernel@vger.kernel.org, lucho@ionkov.net, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com, v9fs-developer@lists.sourceforge.net 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: e27bc174c9c6 Add linux-next specific files for 20180824 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=15dc19a6400000 kernel config: https://syzkaller.appspot.com/x/.config?x=28446088176757ea dashboard link: https://syzkaller.appspot.com/bug?extid=d4252148d198410b864f compiler: gcc (GCC) 8.0.1 20180413 (experimental) syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15f8efba400000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1178256a400000 IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+d4252148d198410b864f@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: double-free or invalid-free in p9stat_free+0x35/0x100 net/9p/protocol.c:48 CPU: 0 PID: 4499 Comm: syz-executor922 Not tainted 4.18.0-next-20180824+ #47 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+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_invalid_free+0x64/0xa0 mm/kasan/report.c:336 __kasan_slab_free+0x150/0x170 mm/kasan/kasan.c:501 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x210 mm/slab.c:3813 p9stat_free+0x35/0x100 net/9p/protocol.c:48 v9fs_dir_readdir+0x68e/0xbc0 fs/9p/vfs_dir.c:153 iterate_dir+0x48b/0x5d0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:231 [inline] __se_sys_getdents fs/readdir.c:212 [inline] __x64_sys_getdents+0x29f/0x510 fs/readdir.c:212 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4406a9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fffc1b13808 EFLAGS: 00000217 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00000000004406a9 RDX: 0000000000000008 RSI: 0000000020000180 RDI: 0000000000000005 RBP: 64663d736e617274 R08: 0000000000401f30 R09: 0000000000401f30 R10: 0000000000401f30 R11: 0000000000000217 R12: 0000000000401f30 R13: 0000000000401fc0 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 4499: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x14e/0x720 mm/slab.c:3727 kmalloc include/linux/slab.h:518 [inline] p9pdu_vreadf net/9p/protocol.c:157 [inline] p9pdu_readf+0x526/0x2170 net/9p/protocol.c:536 p9pdu_vreadf net/9p/protocol.c:208 [inline] p9pdu_readf+0xd5c/0x2170 net/9p/protocol.c:536 p9stat_read+0x194/0x5d0 net/9p/protocol.c:565 v9fs_dir_readdir+0x63d/0xbc0 fs/9p/vfs_dir.c:149 iterate_dir+0x48b/0x5d0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:231 [inline] __se_sys_getdents fs/readdir.c:212 [inline] __x64_sys_getdents+0x29f/0x510 fs/readdir.c:212 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4499: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x210 mm/slab.c:3813 p9stat_free+0x35/0x100 net/9p/protocol.c:48 p9pdu_vreadf net/9p/protocol.c:220 [inline] p9pdu_readf+0xd90/0x2170 net/9p/protocol.c:536 p9stat_read+0x194/0x5d0 net/9p/protocol.c:565 v9fs_dir_readdir+0x63d/0xbc0 fs/9p/vfs_dir.c:149 iterate_dir+0x48b/0x5d0 fs/readdir.c:51 __do_sys_getdents fs/readdir.c:231 [inline] __se_sys_getdents fs/readdir.c:212 [inline] __x64_sys_getdents+0x29f/0x510 fs/readdir.c:212 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801b3006700 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes inside of 32-byte region [ffff8801b3006700, ffff8801b3006720) The buggy address belongs to the page: page:ffffea0006cc0180 count:1 mapcount:0 mapping:ffff8801dac001c0 index:0xffff8801b3006fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801dac01238 ffffea0006cc6548 ffff8801dac001c0 raw: ffff8801b3006fc1 ffff8801b3006000 0000000100000037 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b3006600: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801b3006680: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc > ffff8801b3006700: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff8801b3006780: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8801b3006800: fb fb fb fb fc fc fc fc 05 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