Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3330540imu; Mon, 7 Jan 2019 01:06:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7viXYfjMt2ajftgqy6nluJs+/VUDYOJL/ZZ2j7fjUZ9hf2VCXWS2VY0Ddc1JHZ9Kk3l/54 X-Received: by 2002:a63:4f5e:: with SMTP id p30mr10245307pgl.71.1546852009596; Mon, 07 Jan 2019 01:06:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546852009; cv=none; d=google.com; s=arc-20160816; b=We3f1A21M3q/dzfZZUXCGfPZSDbMNdCr1GlklPBYHKAfO4FT/9cin+P3/0XhaMIUhR Rt4qWkOw/gS7v3v5T2dFn4FXGhOheUMn09IqcO3RnVCQAPnwLlcQ3/6pBGsNKpY60hQl 4urjFXP9XR3b4wpy2bR1inl122vLx6G9krOYFVnmcRbpCiP6hjJ4SJw+ds4pW+ukSA/X DWUcTInWSO1RaJedLmANQVEmAbSw1YOX1DthlU550duTLScYmWkcYXTfMTBQ2zThe2kp TSKMtaLbXxaIcMuE7o35pk7vbB+CslB5FMFBzUM0mYNewhwl/3AQBc2KEr52wAW7E+yP R8qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UT5xsSD7JKUcO/cE3VuA8FmFLS1qFWWqK5zyFRF8KY4=; b=Gu4okbh64jURUBI5DNVK4DaG/HCn0KJrCCgYUMNGAIBM3NdssCyJSgEO/8Jj4Nf+rn oHniIWHVifeKlayEWX98ozGk7SBHIjn9cZ3G+pBcwc1aduv9ANyn/iflVmm0ylQ1WQ1w Jz9WcTK5349sg/DISnB9oTrhjUnihASPNpZm3h76kg36l2XTmfPoAlq/3P+SUxfvb4xl Cah3p2LSI+/sq2MtDHmU1dVBH6Kum+Lp3J7XC1wnQID726n6lhdUmZW1baxopU5FJk0n 7A5SmK7EKhNQxLevVp+fXBWJ9wa9rGwGjF8/6oLMvWqXSkuKe24+nJmmym/8evIhxCji 1DyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LGWLUn1K; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si9194112ply.126.2019.01.07.01.06.34; Mon, 07 Jan 2019 01:06:49 -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=@google.com header.s=20161025 header.b=LGWLUn1K; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726820AbfAGJFM (ORCPT + 99 others); Mon, 7 Jan 2019 04:05:12 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:40286 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726601AbfAGJFL (ORCPT ); Mon, 7 Jan 2019 04:05:11 -0500 Received: by mail-it1-f196.google.com with SMTP id h193so90049ita.5 for ; Mon, 07 Jan 2019 01:05:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UT5xsSD7JKUcO/cE3VuA8FmFLS1qFWWqK5zyFRF8KY4=; b=LGWLUn1K6/8uhyIWlBvQCPA1nLgMIOi0Vhl4aCU1f5IdeWE8LfVrB+YO6AoRkW5/Hx ZzRQxhl2AYnquPeqLHiLgtDziTlJ7/xZr6qn1eoMrt6KT0Je4lHBAKvV36HMYR6WcWQh ZqdVFlfELQK78FvBRnLphsD4ADReqYlOva9q/5T+xUDbWAud/GQgygOX9bA1eLo5jAGZ ZzK4QKTazVx6trqlt4nEZEjn1CfCMQFjHhZkwefvNCPo/Muwigzp+0YKUv8+oI1d/Ta1 jY8JKcHNBx+Sximndi8hpirVhm6O3Vyh8x9XrLNt05obhW2BYXfhmzTzxlsCXBfV99EV e3yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UT5xsSD7JKUcO/cE3VuA8FmFLS1qFWWqK5zyFRF8KY4=; b=W4egNpQv4rm7+IxIpfHTLPES0NE1/c6s7zqhcr10wtCs5srbLRZm1NkNrQz1B7QC69 RKAcNK2lkMhSERBGbOCkWLbrBfmPMoEQGv1T7HAaPtR7ZGrAWtmAkaFeSNKVaTgZi9yz 0/4K+8yAw/nTmtsT9xu8U3083KXQ8KG3wHKs+st/GX2mVj+VsUM8UJ/1ioYu0iIUjkzd QxQIEnxdqL+GcB254U89bnKo6R0VK6i76uk0wSd6nwUWiLXadHT/r4UceZNxGBYu7ddo 9GIB+XFa4mv5xH6j6zsQUPkcasMmMiWCgHr77OwsX3ou6pWp5pg0xgdftzrOpgQRw6/S nBtQ== X-Gm-Message-State: AA+aEWZUUqnuDHTsf0cFEIScyyQBSEbQOVW07maKQP55GsFNF/erYB3G ccLWMDROfcz3FvedmUvoQP2slLND9W4To2f0F3vyoJnSLkO2Cw== X-Received: by 2002:a02:8904:: with SMTP id o4mr39614065jaj.35.1546851910324; Mon, 07 Jan 2019 01:05:10 -0800 (PST) MIME-Version: 1.0 References: <000000000000513fb7057e8d7013@google.com> <20190103210743.6518841e@redhat.com> <20190103225404.66b0ec9f@redhat.com> <20190104115435.478b4b4a@redhat.com> <20190104181424.5ad4b1de@redhat.com> <20190104190544.4b0bfaee@redhat.com> In-Reply-To: <20190104190544.4b0bfaee@redhat.com> From: Dmitry Vyukov Date: Mon, 7 Jan 2019 10:04:58 +0100 Message-ID: Subject: Re: kernel panic: stack is corrupted in udp4_lib_lookup2 To: Stefano Brivio Cc: Willem de Bruijn , Eric Dumazet , syzbot , David Miller , Alexey Kuznetsov , linux-kernel , Network Development , syzkaller-bugs , Hideaki YOSHIFUJI Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 4, 2019 at 7:05 PM Stefano Brivio wrote: > > On Fri, 4 Jan 2019 18:26:16 +0100 > Dmitry Vyukov wrote: > > > On Fri, Jan 4, 2019 at 6:14 PM Stefano Brivio wrote: > > > > > > On Fri, 4 Jan 2019 12:05:04 +0100 > > > Dmitry Vyukov wrote: > > > > > > > I've added these as tests: > > > > > > > > https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/341 > > > > https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/342 > > > > https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/343 > > > > https://github.com/google/syzkaller/blob/master/pkg/report/testdata/linux/report/344 > > > > > > > > Will try to figure out how to distinguish them from true corrupted > > > > reports. Usually when Call Trace does not have any frames, it's a sign > > > > of a corrupted report, and in other crashes we see the same report but > > > > with a stack trace. But some stack-corruption-related reliably don't > > > > have stack traces (not corrupted). But then some other > > > > stack-corruption-related crashes do have stack traces, and for these > > > > no stack trace again means a corrupted kernel output. Amusingly this > > > > is one of the most complex parts of syzkaller. > > > > > > I'm not sure how complicated that would be, but what about some metric > > > based on valid symbol names being reported? > > > > Please elaborate. What do you mean by "valid symbol names"? > > I mean a symbol name listed in /proc/kallsyms on the running system. > > This is usually my minimum threshold for "I can do something with this > report" -- which doesn't mean it's necessarily valid, but well, if you > have that, it means that at least something worked in the reporting, > and you can at least start having a look at a specific function. > > > Note that corrupted output detection solves 2 problems: > > 1. Do we think the output is truncated to the point of being not useful? > > E.g. sometimes kernel produces just 1 line: > > > > general protection fault: 0000 [#1] PREEMPT SMP KASAN > > > > This is sure a crash, but it's not too useful to report. > > Sure. In those tests above you have: > - 341: udp6_lib_lookup2+0x622, handle_irq+0x2cb > - 342: __sanitizer_cov_trace_pc+0x8, handle_irq+0x2cb > - 343: __udp6_lib_err, etc. > - 344: __udp6_lib_lookup+0x1d, etc. > > and this makes all those reports at least minimally useful. > > > 2. Do we have any reasons to think we extracted bogus crash identity? > > E.g. crash intermixed with output from another thread so that we say > > "something-bad in function foo", when in fact function foo come from > > output of the second non-crashing thread. > > Okay, this looks way more complicated :) Yeah, unfortunately, it's quite complicated. Just today this gen popped up. You won't find any ODEBUG checks at that stack, it's completely unrelated and come from another task. ------------[ cut here ]------------ ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x90 kernel/workqueue.c:4916 WARNING: CPU: 1 PID: 45 at lib/debugobjects.c:325 debug_print_object+0x16a/0x250 lib/debugobjects.c:325 CPU: 0 PID: 13619 Comm: syz-executor1 Not tainted 4.20.0+ #13 Kernel panic - not syncing: panic_on_warn set ... 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+0x1db/0x2d0 lib/dump_stack.c:113 warn_alloc.cold+0xc2/0x1c8 mm/page_alloc.c:3570 __vmalloc_node_range+0x57a/0x910 mm/vmalloc.c:1766 __vmalloc_node mm/vmalloc.c:1795 [inline] __vmalloc_node_flags mm/vmalloc.c:1809 [inline] vmalloc+0x6b/0x90 mm/vmalloc.c:1831 sel_write_load+0x1de/0x470 security/selinux/selinuxfs.c:557 __vfs_write+0x116/0xb40 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x105/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe