Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1508792ybt; Thu, 2 Jul 2020 07:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK59z5/41KcJocn5aLSFvipLCyk6owVcam1iBNNfTnR7hBD9yE8GDy0u8x68YwcvhbED/K X-Received: by 2002:a17:906:2e06:: with SMTP id n6mr27134010eji.34.1593699333642; Thu, 02 Jul 2020 07:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593699333; cv=none; d=google.com; s=arc-20160816; b=cKOs6KdxMQwQo6NrM+NAgSj8mCVc2Br8h/1mxSi4XHe7XwXsDblI9FWHGvLLC1XCo1 xlbr/zzak5RBrfMcHoAuduAH8rWMD/T/z6j0XQUgGdgvF+NwIyg+7F4jK4f4CbImrLD4 tybCffgGeXX+o3oZ8E99is548PrKnaZfg+FLMzrwMDOejcc7l1hWm06kD/qc++8GpwJb OWIuV7pJ0NNo8VO6JPKQ/Bil/o5837L93yHzqSKPFXU+VWDh1TdSgxJPEPJxFdeKSKsR U2kTs6vEYZXwOJdjkkXo4VwPQVD2p6GmeuQGIpc0ul4VQHob3HwgCtnDAIW4wNbEAVUH XIWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=RzUm9VxzKzkIyvUG74YkClh+nm0piu2thkPG5KLlZEQ=; b=Hj4kQGMg51tOinrjO/1k+FoMYd16/JmRkmosY2jhkKct7Em0eED1rjd8E5LVdn1c6w EdNmuG52Esz8u36LtUj4dB3XDSUNAl2XWJ3SOlvsAcuUpRcKHC3IDfaFY6GAY0DvZzix IRJCY/tDp4YW05SZ+XMyzENW6OERyRRqnFe038n602G4718girjaNB7TZBB8+fcbv5fK mF69NPNhisl3v7/QwYSHyF36WQde2SEWHqS6Kn0jcKqPeqbS3jzJA6a1x0WwUxfD8QHy sH66BtERxgSYyvFe7pqoRzkYpkB5gkVoS3fyxw2pknez8kIu5AKV0nLYj5gFl/5DVATi 6DlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=Ova5dqxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yh22si6425423ejb.62.2020.07.02.07.15.10; Thu, 02 Jul 2020 07:15:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=Ova5dqxp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729792AbgGBOOw (ORCPT + 99 others); Thu, 2 Jul 2020 10:14:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729479AbgGBOOu (ORCPT ); Thu, 2 Jul 2020 10:14:50 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98939C08C5C1 for ; Thu, 2 Jul 2020 07:14:49 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id c30so21875948qka.10 for ; Thu, 02 Jul 2020 07:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RzUm9VxzKzkIyvUG74YkClh+nm0piu2thkPG5KLlZEQ=; b=Ova5dqxpfnBaFgc4ydCLeIXoIr2iQY4e2CQEU/16yply0i1tuSiMVsJnRmHmQk2vLb B3ynzsnj+3K7gWz9NTLsyaCtF5fOY9X3zpjyrsL3bYmxf/+ggZR+IkdSOtouWsJ1KzCF p2EMYvJwm19KH5XHMd1CbvkLHi4aEJrr/x8UAUioRnbiZ318SAPsLPlZRLHNWoXprOF1 sdyerZrfpBvqntATvILWadp4vrpvVdZVexhi59pLJ2fYt7IO6BcM1YHn2262s1TT72sG xZwDKtKXXCQTDquIv1Q/xJaNezOgEMxVNV4f/kXOsyIXx41olLDJXWCw8x2zsKb9KMZb 5B3A== 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; bh=RzUm9VxzKzkIyvUG74YkClh+nm0piu2thkPG5KLlZEQ=; b=MkxMOVIcw50h2FHkSSR6J4/STqJd/4Ap4vn+VbJqRmFGAXnJ2h6RycwlpANwwzbVpr rmiP/ToCdFbJeHKn5Rx63o4gZfIY+JS1PBWZOk0DEcyifimQMSkZbD9Y8YjMQ8eXWtFY qC9YJmHaYtWfotct8ex7PA9OG9sH1wR5FP9Q2QD3Bvm9KZx1qtC0xFUFPCqTYCG6GIgg uJaFRDkWiC8+HhK3yFKcF/8vrrOea/TumIxULhJR0nTJlqEsZV+9dJNUeTaAoUHybsDF jilJFyyVg1SgmSJDBT8/8y5vG13tWu3DDyenDmJN4UUa27xqI6LJoDG8wwy7jbqklYf0 ULsw== X-Gm-Message-State: AOAM531Iiw6MVi/akOFCxVPMA1QlXL9rVgt3HIeUsvOCSMNGBil8NC1N zx2dYOMdb5hTxehGwo9yuUAdLQ== X-Received: by 2002:a05:620a:81c:: with SMTP id s28mr28901165qks.133.1593699288771; Thu, 02 Jul 2020 07:14:48 -0700 (PDT) Received: from lca.pw (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id y40sm9042248qtc.29.2020.07.02.07.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 07:14:48 -0700 (PDT) Date: Thu, 2 Jul 2020 10:14:37 -0400 From: Qian Cai To: syzbot Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-next@vger.kernel.org, sfr@canb.auug.org.au, syzkaller-bugs@googlegroups.com Subject: Re: linux-next test error: KASAN: stack-out-of-bounds Read in bio_alloc_bioset Message-ID: <20200702141437.GA4240@lca.pw> References: <000000000000bcdeaa05a97280e4@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000000000000bcdeaa05a97280e4@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 02, 2020 at 03:02:14AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit: d37d5704 Add linux-next specific files for 20200702 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1549d0a3100000 > kernel config: https://syzkaller.appspot.com/x/.config?x=a0a0972a399422ff > dashboard link: https://syzkaller.appspot.com/bug?extid=bf04628c1f6179269b0b > compiler: gcc (GCC) 10.1.0-syz 20200507 > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+bf04628c1f6179269b0b@syzkaller.appspotmail.com > > ================================================================== > BUG: KASAN: stack-out-of-bounds in bio_list_empty include/linux/bio.h:561 [inline] > BUG: KASAN: stack-out-of-bounds in bio_alloc_bioset+0x5b2/0x5d0 block/bio.c:482 > Read of size 8 at addr ffffc90000fc7150 by task kworker/u4:4/169 I can also reproduce this. It needs to revert 3 commits, https://lore.kernel.org/lkml/20200702141001.GA3834@lca.pw/ > > CPU: 0 PID: 169 Comm: kworker/u4:4 Not tainted 5.8.0-rc3-next-20200702-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > Workqueue: writeback wb_workfn (flush-8:0) > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0x18f/0x20d lib/dump_stack.c:118 > print_address_description.constprop.0.cold+0x5/0x436 mm/kasan/report.c:383 > __kasan_report mm/kasan/report.c:513 [inline] > kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 > bio_list_empty include/linux/bio.h:561 [inline] > bio_alloc_bioset+0x5b2/0x5d0 block/bio.c:482 > bio_clone_fast+0x21/0x1b0 block/bio.c:710 > bio_split+0xc7/0x2c0 block/bio.c:1477 > blk_bio_segment_split block/blk-merge.c:281 [inline] > __blk_queue_split+0x10e2/0x1650 block/blk-merge.c:331 > blk_mq_submit_bio+0x1b0/0x1760 block/blk-mq.c:2169 > __submit_bio_noacct_mq block/blk-core.c:1181 [inline] > submit_bio_noacct+0xc9e/0x12d0 block/blk-core.c:1214 > submit_bio+0x263/0x5b0 block/blk-core.c:1284 > ext4_io_submit fs/ext4/page-io.c:382 [inline] > io_submit_add_bh fs/ext4/page-io.c:423 [inline] > ext4_bio_write_page+0x9a8/0x1c27 fs/ext4/page-io.c:550 > mpage_submit_page+0x140/0x2c0 fs/ext4/inode.c:2082 > mpage_map_and_submit_buffers fs/ext4/inode.c:2330 [inline] > mpage_map_and_submit_extent fs/ext4/inode.c:2469 [inline] > ext4_writepages+0x237e/0x3960 fs/ext4/inode.c:2782 > do_writepages+0xec/0x290 mm/page-writeback.c:2352 > __writeback_single_inode+0x125/0x1400 fs/fs-writeback.c:1461 > writeback_sb_inodes+0x53d/0xf40 fs/fs-writeback.c:1721 > __writeback_inodes_wb+0xc6/0x280 fs/fs-writeback.c:1790 > wb_writeback+0x8bb/0xd40 fs/fs-writeback.c:1896 > wb_check_background_flush fs/fs-writeback.c:1964 [inline] > wb_do_writeback fs/fs-writeback.c:2052 [inline] > wb_workfn+0xb20/0x13e0 fs/fs-writeback.c:2080 > process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 > worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 > kthread+0x3b5/0x4a0 kernel/kthread.c:292 > ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 > > > addr ffffc90000fc7150 is located in stack of task kworker/u4:4/169 at offset 80 in frame: > arch_atomic64_read arch/x86/include/asm/atomic64_64.h:22 [inline] > arch_atomic64_fetch_add_unless include/linux/atomic-arch-fallback.h:2195 [inline] > arch_atomic64_add_unless include/linux/atomic-arch-fallback.h:2220 [inline] > arch_atomic64_inc_not_zero include/linux/atomic-arch-fallback.h:2236 [inline] > atomic64_inc_not_zero include/asm-generic/atomic-instrumented.h:1609 [inline] > atomic_long_inc_not_zero include/asm-generic/atomic-long.h:497 [inline] > percpu_ref_tryget_live include/linux/percpu-refcount.h:282 [inline] > submit_bio_noacct+0x0/0x12d0 block/blk-core.c:433 > > this frame has 3 objects: > [32, 40) 'bio' > [64, 80) 'bio_list' > [96, 128) 'bio_list_on_stack' > > Memory state around the buggy address: > ffffc90000fc7000: 00 00 00 f2 f2 f2 00 00 00 00 00 f3 f3 f3 f3 f3 > ffffc90000fc7080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > >ffffc90000fc7100: f1 f1 f1 f1 00 f2 f2 f2 00 00 f2 f2 00 00 00 00 > ^ > ffffc90000fc7180: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 > ffffc90000fc7200: 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 00 00 00 f3 > ================================================================== > > > --- > 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#status for how to communicate with syzbot.