Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1003759imu; Fri, 4 Jan 2019 11:06:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN4v6Xdq2mHcAjxAs4dRK4BM9qr4h43jMkKobwToPivkRk2bBmT8Z56W6sj2dwZbYd0560y1 X-Received: by 2002:a63:9e19:: with SMTP id s25mr2623496pgd.203.1546628764213; Fri, 04 Jan 2019 11:06:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546628764; cv=none; d=google.com; s=arc-20160816; b=yGH+zVt+BGeW/R2IdR1YtVT5es9a8uOKWMs1McqBNJqG8l281ZJ85DGJcfmpzu1YOW YZVtU49Uja557VR7kYzXeLBXlWGgTNjdtoPSUK/MaWwYJNFVnuY0RobM735tFY+a0p/H MTPG6NyUeul/LQEnf+b172S465fYlwuKFzXlbuGkK/Y1d813Ze3IBHAO3xElfbtOuO6B KLUAhzuaLAA+lHpD3sBrLHv1oqNfBrQIhXm8vdGIEQQFakcxdo4V7NBoxG8ktpLAmBqA o/ZrmGabAcMq4/A8mgEsNYrM0nUUSdn2Oi21ZuBvkE0WQ2ZpnFQVg1FcBPSaU8DBC6ux zBOA== 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:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=DIemv9Nja99KxWydINi2/W7LJKZrr2ud2RihHMFGyLI=; b=w+YAewUPKcGZrB991FoZsM/auBiCOfYmxbJ6lPfUC448/ja/I9J2nWqPstVlbX/3NI h+lPMrrE1EKd1BBhQ/R2rzqLijMYLsipw7IQYX+PUrkuIFl4P13Hkgds879AG8ev2mOR xTZcgHbaLepJEOD0kd63SRyFkbFsIiXS7HZDv0XXY/oCUSk68ONvZcN0rzIcT7V80pQk xnIsAWsbmJTCILGajz+z2RiTdZeQUY+Z6EOYEMrmO2s7uLX+YdfF4L5ACRvz8JHvcD3y ZS3b6QmK8R7X4kuZqIqx57v/DHkMqoQrwet3Yqdgquh3HAkiGV9k0haORq6gSgxmp0ao WHEQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2si10444342plz.53.2019.01.04.11.05.49; Fri, 04 Jan 2019 11:06:04 -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; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727706AbfADSFz (ORCPT + 99 others); Fri, 4 Jan 2019 13:05:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44684 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbfADSFz (ORCPT ); Fri, 4 Jan 2019 13:05:55 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A87FC37EE0; Fri, 4 Jan 2019 18:05:54 +0000 (UTC) Received: from localhost (ovpn-200-16.brq.redhat.com [10.40.200.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F81A1001F3C; Fri, 4 Jan 2019 18:05:51 +0000 (UTC) Date: Fri, 4 Jan 2019 19:05:44 +0100 From: Stefano Brivio To: Dmitry Vyukov Cc: Willem de Bruijn , Eric Dumazet , syzbot , David Miller , Alexey Kuznetsov , linux-kernel , Network Development , syzkaller-bugs , Hideaki YOSHIFUJI Subject: Re: kernel panic: stack is corrupted in udp4_lib_lookup2 Message-ID: <20190104190544.4b0bfaee@redhat.com> In-Reply-To: References: <000000000000513fb7057e8d7013@google.com> <20190103210743.6518841e@redhat.com> <20190103225404.66b0ec9f@redhat.com> <20190104115435.478b4b4a@redhat.com> <20190104181424.5ad4b1de@redhat.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 04 Jan 2019 18:05:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) -- Stefano