Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3240254pxx; Mon, 2 Nov 2020 04:00:18 -0800 (PST) X-Received: by 2002:a17:906:1f86:: with SMTP id t6mr2328663ejr.325.1604318418186; Mon, 02 Nov 2020 04:00:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrxAKY1JL6Z85QZMXa+B44GGR73cWLY932XvvPw1rrRCnY6s6s5IA/aZOVAuj7T23ud34y X-Received: by 2002:a17:906:1f86:: with SMTP id t6mr2328439ejr.325.1604318416186; Mon, 02 Nov 2020 04:00:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604318416; cv=none; d=google.com; s=arc-20160816; b=ShZfAHvufZk9G3GfxpwnOHEqRGr8LsnqyR8SF6eM84UhxGQZJYH2gE1VSbmuyKFkh/ fFHsFXaEsORVx3dAeFLlgjcX9O0T5idhUQEDCw29GAZMs/mhJvEcE3+MjSH9/G4QKt86 Tm2TTRCSczmMkAXJG7j8twF5XEu70Pl1VyTquHWLR7uStsQv1I1VzqniS6ltvemFBYWU 2mhhu1Ta53nNbAfKi3YhRGDlYbf3BK/HySF+0NlWIEr/YfFWnx2gh8nsp7GJmgXns4Fb re53QuNdRdeHbtfgWlqbOuG89gmtitZrDyHfjE9IX3DMqYASwzBD36l9adBSYAB1WAhu MN7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=Jif07879xIdqk8preXUlJynIzSJslPiVsHNblnvjy0g=; b=sl00hZShwIb6FYhSrNEAQbq/XOGZ+x8sYKOSsvAQJg+R0H4YHH+2ba/fX1DekaSEwS Mby0DyOhTMH7b84lRmLb6Ah7d8tIX4PK3HxIOcKRv9XwiVcQ7h6AYWzjnI2FrIFHEmYA dNsjPUnJQgTL2lyiuejKYLOoh7VhUvbbodGJ1iloCi+RjlqVD8dnaKUmFafHJp0tAlEB 0qwoFLyes4A/r19rf6/8mZI/jAVboKEd6jVaOZYAHzXd7DetLLc15XYudSeg2MCSX6vd NxQn+JLBb865mBfOZDuGJf1V9TfvH+h6z0AQWVXXTVzF1PvCgY3PmfKaU98tr29NjWBS k04A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j2si10973903edj.194.2020.11.02.03.59.53; Mon, 02 Nov 2020 04:00:16 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728746AbgKBLyV (ORCPT + 99 others); Mon, 2 Nov 2020 06:54:21 -0500 Received: from mail-io1-f69.google.com ([209.85.166.69]:52606 "EHLO mail-io1-f69.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728720AbgKBLyU (ORCPT ); Mon, 2 Nov 2020 06:54:20 -0500 Received: by mail-io1-f69.google.com with SMTP id i19so8173824ioa.19 for ; Mon, 02 Nov 2020 03:54:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=Jif07879xIdqk8preXUlJynIzSJslPiVsHNblnvjy0g=; b=TdrZPjsMhGYx0XRtYFxfwl5uygafamsUNKRyMAM2WtfIoCtEOYTQdIvZae2PGcVMAY 8By45ZDUbSNGaumfnvU61rWGLTyc5+gXhete4k6ZQVKRy89MHMdUDjchO79DhR2BQiMS wrGIlghV9QluBPDujkgmCVbUdlp0csA0CAJ9eRKvapYHzIIOK1FfMJIPeXhf3g+EGsti MUUIMftfnzN705bcN8CSKezy7PDJWaNTjpXHAS9H7QzZhLVW7jIWASp90sBaYab2xAUh tf6+GtAH+7yKV2vjU9hep0kYz4RBk6e91wddVc4IASqRKH+z6cegdTmBoN7v8svYfXRS zUGA== X-Gm-Message-State: AOAM5338Ao2jO0p19q0IBsxlsxHEaERy16snyoLu46xtpbmNSVjRk8lJ JwevTI7PyyX+h22i37SNJvn9z0aStsCgNVVsZNrioy0fI7Kl MIME-Version: 1.0 X-Received: by 2002:a02:3b57:: with SMTP id i23mr11915552jaf.110.1604318059322; Mon, 02 Nov 2020 03:54:19 -0800 (PST) Date: Mon, 02 Nov 2020 03:54:19 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000008604f05b31e6867@google.com> Subject: KASAN: null-ptr-deref Write in kthread_use_mm From: syzbot To: axboe@kernel.dk, io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@kernel.org, mingo@redhat.com, peterz@infradead.org, rostedt@goodmis.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk, will@kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 4e78c578 Add linux-next specific files for 20201030 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=148969d4500000 kernel config: https://syzkaller.appspot.com/x/.config?x=83318758268dc331 dashboard link: https://syzkaller.appspot.com/bug?extid=b57abf7ee60829090495 compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17e1346c500000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1388fbca500000 The issue was bisected to: commit 4d004099a668c41522242aa146a38cc4eb59cb1e Author: Peter Zijlstra Date: Fri Oct 2 09:04:21 2020 +0000 lockdep: Fix lockdep recursion bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1354e614500000 final oops: https://syzkaller.appspot.com/x/report.txt?x=10d4e614500000 console output: https://syzkaller.appspot.com/x/log.txt?x=1754e614500000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+b57abf7ee60829090495@syzkaller.appspotmail.com Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion") ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: null-ptr-deref in atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline] BUG: KASAN: null-ptr-deref in mmgrab include/linux/sched/mm.h:36 [inline] BUG: KASAN: null-ptr-deref in kthread_use_mm+0x11c/0x2a0 kernel/kthread.c:1257 Write of size 4 at addr 0000000000000060 by task io_uring-sq/26191 CPU: 1 PID: 26191 Comm: io_uring-sq Not tainted 5.10.0-rc1-next-20201030-syzkaller #0 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+0x107/0x163 lib/dump_stack.c:118 __kasan_report mm/kasan/report.c:549 [inline] kasan_report.cold+0x5/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline] mmgrab include/linux/sched/mm.h:36 [inline] kthread_use_mm+0x11c/0x2a0 kernel/kthread.c:1257 __io_sq_thread_acquire_mm fs/io_uring.c:1092 [inline] __io_sq_thread_acquire_mm+0x1c4/0x220 fs/io_uring.c:1085 io_sq_thread_acquire_mm_files.isra.0+0x125/0x180 fs/io_uring.c:1104 io_init_req fs/io_uring.c:6661 [inline] io_submit_sqes+0x89d/0x25f0 fs/io_uring.c:6757 __io_sq_thread fs/io_uring.c:6904 [inline] io_sq_thread+0x462/0x1630 fs/io_uring.c:6971 kthread+0x3af/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 ================================================================== Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 26191 Comm: io_uring-sq Tainted: G B 5.10.0-rc1-next-20201030-syzkaller #0 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+0x107/0x163 lib/dump_stack.c:118 panic+0x306/0x73d kernel/panic.c:231 end_report+0x58/0x5e mm/kasan/report.c:106 __kasan_report mm/kasan/report.c:552 [inline] kasan_report.cold+0xd/0x37 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:186 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:192 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_inc include/asm-generic/atomic-instrumented.h:240 [inline] mmgrab include/linux/sched/mm.h:36 [inline] kthread_use_mm+0x11c/0x2a0 kernel/kthread.c:1257 __io_sq_thread_acquire_mm fs/io_uring.c:1092 [inline] __io_sq_thread_acquire_mm+0x1c4/0x220 fs/io_uring.c:1085 io_sq_thread_acquire_mm_files.isra.0+0x125/0x180 fs/io_uring.c:1104 io_init_req fs/io_uring.c:6661 [inline] io_submit_sqes+0x89d/0x25f0 fs/io_uring.c:6757 __io_sq_thread fs/io_uring.c:6904 [inline] io_sq_thread+0x462/0x1630 fs/io_uring.c:6971 kthread+0x3af/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296 Kernel Offset: disabled Rebooting in 86400 seconds.. --- This report 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 issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches