Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5463066iob; Mon, 9 May 2022 17:32:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTWpxnCqIEEzyQY1W1Nf5QoWTElkQFd+aXiUU+3xN5yfZMjmgYOEH3OwzlDR4eIhCUbuo5 X-Received: by 2002:a05:6402:5c9:b0:420:aac6:257b with SMTP id n9-20020a05640205c900b00420aac6257bmr20145533edx.128.1652142775108; Mon, 09 May 2022 17:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652142775; cv=none; d=google.com; s=arc-20160816; b=g4hekxli20sc6onbUdE5AkXvygVgboPyUXzCGQpJrZJ75klcYDEkm8Ckr2yvbW6qX8 boYVl1U17GEW1XmqPc5e+0ExQSJ7VJHOdkFZlPcSfr03mWbi9F0Vh/KPi2L61jgelmkY H0lqXgsyc+UdFY0VpZ8rEdm8ED3tMU+Ak45xalVehmp7cu1ScWWoHCHE1cSiFPkB++Ti RMdTsVTKfW9moG9pLtAGow/aYL5asKoKb4i67sh6QIXVnRCtYCzQOeRsyoiHJr9iK4y+ bm2x6mPuqSLW6s4rpqVTz2a0HyD2If/rBgkOdnLCFa+/amSRZgkBijD8EqsaLvlA4w4X pWhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=m/Cpn4znmGtPMU6JmBbESD0qm5X4CWqOjWVCzDX837U=; b=pMfXwpXYMC1G41LTtlSzeumK4NOrx+OL9h9r/PegbGSYYJ9AHVwFNK6LIjPuHVj065 BBbmqB+64m1tWImmbMyvt8PNAgPem8rzEefppI+UmupDRC0CPiWpvUsRV9jfKe5OO+41 viTFVEcWnhC4nN3GyaZfXBwnV2z18rsuGUjQ+mnZRc1Nj2gDjGwmMwz4N/av/sfA5nKo lmLL+bQ0ZjjRh8k4P7dKxYmIodHhK672ey4J9NCmw9yk1Q5fkZSjT4cOika3rVHOt/EK ZK+00ebCL6BshQLbGOjTPYLTq/VbRwuEmot3vGo0dDwImSV8eWRjTCDB3HnIaaXVyGyl SG8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="P97i/8HX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a05640251ca00b0042839620d77si3160010edd.631.2022.05.09.17.32.32; Mon, 09 May 2022 17:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="P97i/8HX"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233425AbiEJASQ (ORCPT + 99 others); Mon, 9 May 2022 20:18:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233373AbiEJASP (ORCPT ); Mon, 9 May 2022 20:18:15 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EF30A262714 for ; Mon, 9 May 2022 17:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652141659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m/Cpn4znmGtPMU6JmBbESD0qm5X4CWqOjWVCzDX837U=; b=P97i/8HX+9KZhcMn/E2CzV/ck8pW49p8vy/8HMul4Js+Rb/UYx0XvdgPZrc/Xur0Q7CSre YmPxweqRBKa461E8szLLwzCezG9Abda0rQoPboeFH/npL5uLe4Elb6iIW0R8JJ1j4wHHtt XTsbcxEXhO85maasg/XZlK3LlJDH2tE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-VeKmZPTnMrGw1e9T0pqueA-1; Mon, 09 May 2022 20:14:13 -0400 X-MC-Unique: VeKmZPTnMrGw1e9T0pqueA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8FE9811E80; Tue, 10 May 2022 00:14:12 +0000 (UTC) Received: from T590 (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD07840D1B9A; Tue, 10 May 2022 00:14:03 +0000 (UTC) Date: Tue, 10 May 2022 08:13:58 +0800 From: Ming Lei To: Jens Axboe Cc: syzbot , andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com, kafai@fb.com, kpsingh@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, songliubraving@fb.com, syzkaller-bugs@googlegroups.com, yhs@fb.com, Christoph Hellwig Subject: Re: [syzbot] KASAN: use-after-free Read in bio_poll Message-ID: References: <00000000000029572505de968021@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2022 at 11:02:41AM -0600, Jens Axboe wrote: > On 5/9/22 10:14 AM, syzbot wrote: > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit: c5eb0a61238d Linux 5.18-rc6 > > git tree: upstream > > console+strace: https://syzkaller.appspot.com/x/log.txt?x=112bf03ef00000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=79caa0035f59d385 > > dashboard link: https://syzkaller.appspot.com/bug?extid=99938118dfd9e1b0741a > > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12311571f00000 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=177a2e86f00000 > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > Reported-by: syzbot+99938118dfd9e1b0741a@syzkaller.appspotmail.com > > > > ================================================================== > > BUG: KASAN: use-after-free in bio_poll+0x275/0x3c0 block/blk-core.c:942 > > Read of size 4 at addr ffff8880751d92b4 by task syz-executor486/3607 > > > > CPU: 0 PID: 3607 Comm: syz-executor486 Not tainted 5.18.0-rc6-syzkaller #0 > > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > > Call Trace: > > > > __dump_stack lib/dump_stack.c:88 [inline] > > dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 > > print_address_description.constprop.0.cold+0xeb/0x495 mm/kasan/report.c:313 > > print_report mm/kasan/report.c:429 [inline] > > kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 > > bio_poll+0x275/0x3c0 block/blk-core.c:942 > > __iomap_dio_rw+0x10ee/0x1ae0 fs/iomap/direct-io.c:658 > > iomap_dio_rw+0x38/0x90 fs/iomap/direct-io.c:681 > > ext4_dio_write_iter fs/ext4/file.c:566 [inline] > > ext4_file_write_iter+0xe4d/0x1510 fs/ext4/file.c:677 > > call_write_iter include/linux/fs.h:2050 [inline] > > do_iter_readv_writev+0x3d1/0x640 fs/read_write.c:726 > > do_iter_write+0x182/0x700 fs/read_write.c:852 > > vfs_writev+0x1aa/0x630 fs/read_write.c:925 > > do_pwritev+0x1b6/0x270 fs/read_write.c:1022 > > __do_sys_pwritev2 fs/read_write.c:1081 [inline] > > __se_sys_pwritev2 fs/read_write.c:1072 [inline] > > __x64_sys_pwritev2+0xeb/0x150 fs/read_write.c:1072 > > do_syscall_x64 arch/x86/entry/common.c:50 [inline] > > do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > > entry_SYSCALL_64_after_hwframe+0x44/0xae > > RIP: 0033:0x7f6846af7e69 > > Guys, should we just queue: > > ommit 9650b453a3d4b1b8ed4ea8bcb9b40109608d1faf > Author: Ming Lei > Date: Wed Apr 20 22:31:10 2022 +0800 > > block: ignore RWF_HIPRI hint for sync dio > > up for 5.18 and stable? I am fine with merging to 5.18 & stable. Thanks, Ming