Received: by 10.213.65.68 with SMTP id h4csp1753853imn; Sun, 1 Apr 2018 14:06:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+BfDoym3nTUkaO90Ef9ERyWZ+uZj4T9V7STPmm3YcU40r1jRG6/dkRrK6uW69F6DMzqH/M X-Received: by 10.99.140.77 with SMTP id q13mr4695953pgn.44.1522616775074; Sun, 01 Apr 2018 14:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522616775; cv=none; d=google.com; s=arc-20160816; b=D38g4KbD24DZMhF4uihics6XV8+m8LFZhn3TsYUhFTUprv2YkXiHK1C1G+2YKhsBtw vMRIw7RJkwO0eNZXmAXz1E538j4m2tBPqHchPHOWkswKoDFbt5BLnsBGnrSTb1n8qCv3 uesykTAZSWUg17l7hhlawzLAQOzH09E2Za+VElNxQcIlKDcBW08NYJaGHHt/uz0hLnuw IWX1mZNduRYQHnvxsn/PCGVt+IXftF8LrTD+LOOxYny9Cjp3AxKCY5AH0yCR1knOne6d 1Tfje7EG1ia80wIcJ9FCGUFIvQq9gOjJIpLbJuWz6p0w/1xE/1BnsQkbXEiYN8H8Pdr9 pPvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=gafPqnFtdgbW1XxFcDUaQbIrCY2ct51HEixZiCerRdE=; b=cbR61h/h3E65hKoHkgWrdAq98iuNDN+kS+BswMbVkSVzIFZV5X/jQeyckmxnW8WsQj V8XQ25iAOFk6WIJxchlE/h6rsSCjTwVej7x1vEGPrFmAuYk0a0gfYHXcqKJ+Dlg9xT8F d4VOOUR6F+owOWUCxSRhi2ovzXmIDvS64XtIxygcqLO5jysOv86wmj77RW3bcba7Eqjb Ma64cgz+MrFRZgue4gSN0/ae/ZCn680bGH6p/6WPJm3mXsfeDFvjqLfCWmU5jqK546Oh 4Z6Xaik4Pj88ylNFuQMvtkIWQ7xCTnElOgWDgf+UztZAAjALaDV7yXz9h02hvzNJwRtw QCyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HY5NS4/H; 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=QUARANTINE 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 h186si7627pge.677.2018.04.01.14.05.58; Sun, 01 Apr 2018 14:06:15 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HY5NS4/H; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947AbeDAVEr (ORCPT + 99 others); Sun, 1 Apr 2018 17:04:47 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35880 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbeDAVEp (ORCPT ); Sun, 1 Apr 2018 17:04:45 -0400 Received: by mail-pf0-f193.google.com with SMTP id g14so8226946pfh.3; Sun, 01 Apr 2018 14:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gafPqnFtdgbW1XxFcDUaQbIrCY2ct51HEixZiCerRdE=; b=HY5NS4/HoVQHX6HP1b45vZV0yEaHAd+tYrMZLIU7iPy9uOeT89m+W6kBMgtV7+wukj e2nNZjwA3eDzmd3ExvJrsmRNkIsbb2VfkrO1ZJ/J576p+U7oFiaCojLQJd9Q8qlJQd06 mWiX6JaZB7O1Nssp0Y5JI0JjYQ4J367NDG/t7U6xUZ59jfwMeGrhhFQH4715AsD8xkcw y00dzkdlQzt0iwCfwzXoqaQAe7fIam61aDUsJt/9NgRIdPMxriBk3K5HKrPDjq9hZgcz HC39u6kHjpd/hhFvfTqbMRQTbC9qkjO87E6rgfzOqG7uQ+/CKZ2BuRyWypY7MeFBBkzo /flg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gafPqnFtdgbW1XxFcDUaQbIrCY2ct51HEixZiCerRdE=; b=JzVACwZoYV9Ma2pdFdxomQ0pwyVGli6/iUJKeIsvoiLrRF/buu7vBy0kzppLWrskma 246qPpHtFiqgZRjIN/lPNt3iUd3sd1QiOYSf5KtaJZ5eoCQHpQ6xiT/giRFLuo46U/hJ qF4oylU4QTO8kGfbkZPWiTgD1CtnIN6vy8KxTwJSaV0+fBr1P3JHi3SZGPM6s2JhJJeH IzVblSpRBHVr7c2fBI2yw0jgADEXZw7muaqtOKhLBya26E8cR+BTlv9Iuhz4T5F4DkKd YNULY+4NYJSA+tMSHFDrU4Dh4qff9sB1CiBHgfr7jcGdlvVriT2Lh0tjlDNj7ex0yGG5 3Bhg== X-Gm-Message-State: AElRT7GnWdCdPIjBW7PeWCalVtj+uG9V81GpWeBMBBi6uGpuwiNH1axY zLWDdV8FrkSl+/YYAh04oi4= X-Received: by 10.99.143.3 with SMTP id n3mr4632765pgd.136.1522616685042; Sun, 01 Apr 2018 14:04:45 -0700 (PDT) Received: from sol.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id h2sm27364596pfh.86.2018.04.01.14.04.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 01 Apr 2018 14:04:44 -0700 (PDT) Date: Sun, 1 Apr 2018 14:05:08 -0700 From: Eric Biggers To: Al Viro Cc: syzbot , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: BUG: corrupted list in __dentry_kill Message-ID: <20180401210508.GA743@sol.localdomain> References: <001a11447acaa9eec40568bd5438@google.com> <20180401033519.GZ30522@ZenIV.linux.org.uk> <20180401200531.GA30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180401200531.GA30522@ZenIV.linux.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 01, 2018 at 09:05:31PM +0100, Al Viro wrote: > On Sun, Apr 01, 2018 at 04:35:19AM +0100, Al Viro wrote: > > On Sat, Mar 31, 2018 at 04:01:02PM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot hit the following crash on bpf-next commit > > > 7828f20e3779e4e85e55371e0e43f5006a15fb41 (Sat Mar 31 00:17:57 2018 +0000) > > > Merge branch 'bpf-cgroup-bind-connect' > > > syzbot dashboard link: > > > https://syzkaller.appspot.com/bug?extid=f3bd89a5ab3266b10540 > > > > > > So far this crash happened 22 times on bpf-next, upstream. > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?id=6290970458980352 > > > syzkaller reproducer: > > > https://syzkaller.appspot.com/x/repro.syz?id=6577156880596992 > > > Raw console output: > > > https://syzkaller.appspot.com/x/log.txt?id=5107570603720704 > > > Kernel config: > > > https://syzkaller.appspot.com/x/.config?id=5909223872832634926 > > > compiler: gcc (GCC) 7.1.1 20170620 > > > > > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > > > Reported-by: syzbot+f3bd89a5ab3266b10540@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. > > > > > > RBP: 00007ffd1bbb3ae0 R08: 0000000020000200 R09: 0000000300000000 > > > R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffff > > > R13: 0000000000000003 R14: 0000000000001380 R15: 00007ffd1bbb3378 > > > list_del corruption. prev->next should be 00000000a8104008, but was > > > 00000000081c6144 > > > > Lovely... I'll look into that tomorrow morning. > > Can't reproduce - it reproducer had been running for several hours, with > that kernel and that config (gcc 6.3, not 7.1, though), no oopsen... > > If somebody can reproduce that thing, I'd appreciate having it bisected > a bit... > Apparently the reproducer wants to inject a fault into a specific memory allocation, and something is causing the memory allocations to be different. It works for me in ~10 seconds after applying the below patch to the C reproducer. (I also did 'echo 0 | tee /sys/kernel/debug/fail*/verbose' beforehand to quiet all the fault injection messages.) I'm guessing the bug is in the error handling in "rpc_pipefs", but not sure exactly what yet. The last messages in the kernel log before the BUG() were: [ 42.965515] net/sunrpc/rpc_pipe.c: __rpc_create_common failed to allocate inode for dentry blocklayout [ 42.967234] net/sunrpc/rpc_pipe.c: rpc_mkpipe_dentry() failed to create pipe nfs/blocklayout (errno = -12) diff --git a/syz_dentry_kill.c b/syz_dentry_kill.c index e38ee57..8c6a76e 100644 --- a/syz_dentry_kill.c +++ b/syz_dentry_kill.c @@ -723,6 +723,7 @@ static void loop() } if (symlink(cgroupdir_net, "./cgroup.net")) { } + srand(getpid()); execute_one(); doexit(0); } @@ -786,7 +787,7 @@ void execute_one() 48); write_file("/sys/kernel/debug/failslab/ignore-gfp-wait", "N"); write_file("/sys/kernel/debug/fail_futex/ignore-private", "N"); - inject_fault(60); + inject_fault(rand() % 500); syscall(__NR_mount, 0x20000300, 0x20000140, 0x200002c0, 0, 0x20000200); }