Received: by 10.223.176.46 with SMTP id f43csp3456501wra; Mon, 22 Jan 2018 14:47:12 -0800 (PST) X-Google-Smtp-Source: AH8x224yfjHAu8GuOzCM4Ef4xKOy4/HZCpn6x+oH8HpJRGGojHtxvYAsGFU+J3qj5gCxk5mkv0JI X-Received: by 10.107.136.80 with SMTP id k77mr801719iod.4.1516661232297; Mon, 22 Jan 2018 14:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516661232; cv=none; d=google.com; s=arc-20160816; b=mufOdX/L8Wkv925fa5YIIlvFfYnYhN8WefE0D+wYci9vo4UTfNHkWodrHdv31Ex05u ZNcVFUxUjCzTk1ZOH6hkJKMtsQy1jA2qBN1AdYnOL6m8rcEMMOwPsCPYZFqX3c4BHNpG iB6cOWz7gbX5huYAIoZMGDIZqCazWsHZ/yDgdPZ+KmQbhpf9ALSk+PtYUQALC1XResE2 FeRJcp+H4ED7ozgNO8BCzDKV3+pppxf4D3Ngh6arRuYhGaFx5Mo5UO0PVFNt0P48TaKT y6hkL8oawVN9m9dR/idynqyGISDG+zCczaBNzrcXn/cKRuoxqH8ijIIfpUfNF6dmWHfE AiHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=Q3+bF7sBYhMQ2/P0M/v84UVusPs/0QQGXr8VBgF3T7s=; b=iBNQNJkya+xiQF8ZEHAx7oHU/OVODOAYHGAz8lXugh0RBqsKpQcfcU+F9d0ivPQ2p+ Z+Qa3K7wgpBlbDbTXqoXRuKwIf70CMZpItqY94X5fJgOhluVQImGAgKmtLwnwVtnFhbV NxpuXfIZbGfa/6oD7KqhlotpwU+3wPbu9tqyRlLswWErnmvVDio1xmeZwYHvXMy5nKnP o33tFDo3QGo+mNNlsars+87GXmhiH8qVLEiVS/H8Dr3hlVLqi1cWxK+fZC+akcS96TJO TA1LKGG0M1Cj8IIV34YMD+SZM8fCNPif28T1E9hdjlGfCC4cSgQfTugXoMgH/zaL/T27 TVWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Sq+RS0ZP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 195si2779074iou.107.2018.01.22.14.46.58; Mon, 22 Jan 2018 14:47:12 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Sq+RS0ZP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbeAVWp0 (ORCPT + 99 others); Mon, 22 Jan 2018 17:45:26 -0500 Received: from mail-pg0-f41.google.com ([74.125.83.41]:36336 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751048AbeAVWpZ (ORCPT ); Mon, 22 Jan 2018 17:45:25 -0500 Received: by mail-pg0-f41.google.com with SMTP id k68so8233445pga.3; Mon, 22 Jan 2018 14:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=Q3+bF7sBYhMQ2/P0M/v84UVusPs/0QQGXr8VBgF3T7s=; b=Sq+RS0ZP8bqnssTqO1O4Y7RnAMMXgN/JtR4pVxEjrzo5h0ICZP73QidAxy8pUH11Cp T2H91DgMjyYsIjHoS1CqDrOs3TYX09EiBtA+vUDCG9RWSfoCzAednfBtURM7FHy1B6AS yl9tLJl+vsam4wb++BIB62aon1fT7kMTGGzvobjrUpc9cAsV9vA5zeuzyvgj/5etyvRF Qb1RTueaWQUX0pY4TtWIQItGZKQMp94qfy06w86P8qccKIoA5hryFYIoCiKkoiMM1mdG ZyTdqkyZIediYwh77eKGnXXmzylVaAxZHIxaSeX+sMHQOnNOunYJTNGhY1sx8Cziqq21 uRLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Q3+bF7sBYhMQ2/P0M/v84UVusPs/0QQGXr8VBgF3T7s=; b=l4oa7ANg6oMWb+iMNQ6IpRRq3Jb63ThhXMAT8WQCHnIxsqvbW3EHNpiHWOhWuigsq8 E5Y/i7n9OaejSL2nsD/tbkLvaQXUX7JUJJcGIoRfCbC2azoeu+XCVXJoHCz7bDEJ27Nf 2azKe53+Siwgcg2eakcXYub9fdrJslfOltE7WaOh1a3hQckbdMP4Kv+UV5noWQOzxis7 Go+tt+vZ/gYKdrfuFn4FZm4eTckT/iFBPp1wDe/FKX1dPLoijZQ8lpUs07YzGUg90b1K vrnxvMsuCMbSU9SbyoLSMBn10CffaR2uZ/1oRKdurvUmshObhYPFbv4mKfB6wZcQHEeH RNVg== X-Gm-Message-State: AKwxyteFkJ/tLxcl0EteHtbdEl1SI6YRN/vIUfV8h4kvE28Lj2kcMj3R wFlh1A7B/RgoMiuxT8P9sAc= X-Received: by 10.99.181.72 with SMTP id u8mr3174184pgo.205.1516661124779; Mon, 22 Jan 2018 14:45:24 -0800 (PST) Received: from dsa-mb.local ([216.129.126.118]) by smtp.googlemail.com with ESMTPSA id 191sm1846031pfv.127.2018.01.22.14.45.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 14:45:24 -0800 (PST) Subject: Re: KASAN: slab-out-of-bounds Read in erspan_xmit To: syzbot , davem@davemloft.net, kuznet@ms2.inr.ac.ru, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com, yoshfuji@linux-ipv6.org, William Tu References: <001a113e9f281d2cc3056362d99a@google.com> From: David Ahern Message-ID: <7d3e467c-543c-7076-e900-25028a2c54b5@gmail.com> Date: Mon, 22 Jan 2018 15:45:22 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <001a113e9f281d2cc3056362d99a@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ cc William Tu ] On 1/22/18 12:58 PM, syzbot wrote: > Hello, > > syzbot hit the following crash on net-next commit > 9d6474e458b13a94a0d5b141f2b8f38adf1991ae (Mon Jan 22 02:55:38 2018 +0000) > tun: add missing rcu annotation > > So far this crash happened 5 times on net-next. > C reproducer is attached. > syzkaller reproducer is attached. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached. > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+9723f2d288e49b492cf0@syzkaller.appspotmail.com > It will help syzbot understand when the bug is fixed. See footer for > details. > If you forward the report, please keep this part and the footer. > > ================================================================== > BUG: KASAN: slab-out-of-bounds in erspan_xmit+0x22d4/0x2430 > net/ipv4/ip_gre.c:735 > Read of size 2 at addr ffff8801c50bb08b by task syzkaller525754/3647 > > CPU: 0 PID: 3647 Comm: syzkaller525754 Not tainted 4.15.0-rc8+ #203 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS > Google 01/01/2011 > Call Trace: >  __dump_stack lib/dump_stack.c:17 [inline] >  dump_stack+0x194/0x257 lib/dump_stack.c:53 >  print_address_description+0x73/0x250 mm/kasan/report.c:252 >  kasan_report_error mm/kasan/report.c:351 [inline] >  kasan_report+0x25b/0x340 mm/kasan/report.c:409 >  __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:440 >  erspan_xmit+0x22d4/0x2430 net/ipv4/ip_gre.c:735 >  __netdev_start_xmit include/linux/netdevice.h:4053 [inline] >  netdev_start_xmit include/linux/netdevice.h:4062 [inline] >  packet_direct_xmit+0x3ad/0x790 net/packet/af_packet.c:267 >  packet_snd net/packet/af_packet.c:2944 [inline] >  packet_sendmsg+0x3aed/0x60b0 net/packet/af_packet.c:2969 >  sock_sendmsg_nosec net/socket.c:630 [inline] >  sock_sendmsg+0xca/0x110 net/socket.c:640 >  SYSC_sendto+0x361/0x5c0 net/socket.c:1721 >  SyS_sendto+0x40/0x50 net/socket.c:1689 >  entry_SYSCALL_64_fastpath+0x29/0xa0 > RIP: 0033:0x445649 > RSP: 002b:00007ffe82dde5b8 EFLAGS: 00000217 ORIG_RAX: 000000000000002c > RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 0000000000445649 > RDX: 0000000000000000 RSI: 0000000020003fd9 RDI: 0000000000000004 > RBP: 00000000004a78c5 R08: 0000000020008000 R09: 000000000000001c > R10: 0000000000000000 R11: 0000000000000217 R12: 0000000000402720 > R13: 00000000004027b0 R14: 0000000000000000 R15: 0000000000000000 > > Allocated by task 3221: >  save_stack+0x43/0xd0 mm/kasan/kasan.c:447 >  set_track mm/kasan/kasan.c:459 [inline] >  kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 >  kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 >  kmem_cache_alloc+0x12e/0x760 mm/slab.c:3544 >  getname_flags+0xcb/0x580 fs/namei.c:138 >  getname+0x19/0x20 fs/namei.c:209 >  do_sys_open+0x2e7/0x6d0 fs/open.c:1053 >  SYSC_open fs/open.c:1077 [inline] >  SyS_open+0x2d/0x40 fs/open.c:1072 >  entry_SYSCALL_64_fastpath+0x29/0xa0 > > Freed by task 3221: >  save_stack+0x43/0xd0 mm/kasan/kasan.c:447 >  set_track mm/kasan/kasan.c:459 [inline] >  kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 >  __cache_free mm/slab.c:3488 [inline] >  kmem_cache_free+0x83/0x2a0 mm/slab.c:3746 >  putname+0xee/0x130 fs/namei.c:258 >  do_sys_open+0x31b/0x6d0 fs/open.c:1068 >  SYSC_open fs/open.c:1077 [inline] >  SyS_open+0x2d/0x40 fs/open.c:1072 >  entry_SYSCALL_64_fastpath+0x29/0xa0 > > The buggy address belongs to the object at ffff8801c50ba000 >  which belongs to the cache names_cache of size 4096 > The buggy address is located 139 bytes to the right of >  4096-byte region [ffff8801c50ba000, ffff8801c50bb000) > The buggy address belongs to the page: > page:ffffea0007142e80 count:1 mapcount:0 mapping:ffff8801c50ba000 > index:0x0 compound_mapcount: 0 > flags: 0x2fffc0000008100(slab|head) > raw: 02fffc0000008100 ffff8801c50ba000 0000000000000000 0000000100000001 > raw: ffffea0007145320 ffffea00071433a0 ffff8801dae2c600 0000000000000000 > page dumped because: kasan: bad access detected > > Memory state around the buggy address: >  ffff8801c50baf80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >  ffff8801c50bb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >> ffff8801c50bb080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >                       ^ >  ffff8801c50bb100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >  ffff8801c50bb180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc > ================================================================== > > > --- > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkaller@googlegroups.com. > > syzbot will keep track of this bug report. > If you forgot to add the Reported-by tag, once the fix for this bug is > merged > into any tree, please reply to this email with: > #syz fix: exact-commit-title > If you want to test a patch for this bug, please reply with: > #syz test: git://repo/address.git branch > and provide the patch inline or as an attachment. > To mark this as a duplicate of another syzbot report, please reply with: > #syz dup: exact-subject-of-another-report > If it's a one-off invalid bug report, please reply with: > #syz invalid > Note: if the crash happens again, it will cause creation of a new bug > report. > Note: all commands must start from beginning of the line in the email body.