Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1146100pxb; Thu, 28 Jan 2021 09:03:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJywcA1Fl/esZSE8z0jkQCmnw/X7QW+lHOJyVqFufBN1ITFSiHmHfNiUPXtCVwepmPt/Ozgq X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr508554edb.259.1611853398210; Thu, 28 Jan 2021 09:03:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611853398; cv=none; d=google.com; s=arc-20160816; b=l72TGB74jcql4fIH5tg54H0ehIKN9Qs4JFGilDu9KkWcscy0vtCLJh4i26sDB79F4W mn9TTpX61YdsVnGUNeuhcs0/Q8hIPt6wT9aK8q+hKGxn5UVBRfvkefUQDgH8I8EL2hNo bsD8roZtY39B48/J8uMbIhPIs0ZnpDG/cNGCHFXq11gEYPzFRCXFQqHHgCgnRVGsl4X0 h68fnRHxUQVcm5hgvTCffVxpVaITlMktFwdcZEKy5KTn2Zek/KYURYtyM06gSkd9ubUL 4ZGRutjn8yqrHyDxFt7OalaJPp9vxy16cTkofPRJVRBFmg0mc7BWWWR5jGvUHZlOBIka A7PQ== 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=5eUqdE/qujF2vvImOu8U/X+yORx2488KJ3tM2EhWIwA=; b=LbSV2+CNozxj4VnO5RUvxlF/qklwfJUrFKWzK60kaMM6IbwOuyxUQmMguUZ//OEF/W Dq/CSEfu7LEnZIS2omcQYUPt6M+fZ32taYCMmpwjAelkzgF7irnYlW/qwEZ44K5XWbOJ Tb/v8ryN/CyeXP9NXye/RaKIzqsREuoIlxJIvtpxk5kTBsodq44QwXEPF8+ABD8vG5cn Rby35Opbw+cuZ7bGoJbbIeD3xnnioDjlJfwqXZV0pvVXzfe74dwfg3S/NuYYmxiZ5Tv+ VfXKR/hYuaJYkNSo3Nd9Xl85aoicwPzciD1PBBSjCIR7HU0GdTvBuQKX1Wpucu+ijcMI UDnQ== 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 q23si1706768edv.287.2021.01.28.09.02.53; Thu, 28 Jan 2021 09:03:18 -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 S232767AbhA1Q76 (ORCPT + 99 others); Thu, 28 Jan 2021 11:59:58 -0500 Received: from mail-il1-f197.google.com ([209.85.166.197]:54680 "EHLO mail-il1-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232698AbhA1Q7E (ORCPT ); Thu, 28 Jan 2021 11:59:04 -0500 Received: by mail-il1-f197.google.com with SMTP id l68so5203167ild.21 for ; Thu, 28 Jan 2021 08:58:48 -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=5eUqdE/qujF2vvImOu8U/X+yORx2488KJ3tM2EhWIwA=; b=djjsd2R1a7SNfrBs2Y9p/KlJ7XutBwX1V1ITj8pASqCmcjmJ5f2FbMjpRfarULrP5M FmpUsTEaEn1DIHDrIMjBjeXteHrsJOfd+352VRR+e1owdt5Ujm/DAK8iQPFsZXU8Gf7z WqS6tOPykyItNCjGYJGVUYJu6X3CL7lT9SUxMdAX2y4Qetw4ma1itQGssQjXD4uQnldT 8+Dz87gKOFl9neOeUfJg5Lygn+VZZbaWQqHA+mGi/q26GuTvdTYGdGfQp+2QEPMpINck KimOFDeQpTKs6f7GX+I43Fxl7Zb9wBE77h6JDpcl0i9M12NodPESUWt6AJ503ngRDXtM 9T9w== X-Gm-Message-State: AOAM530dYKOCrJWWXyCpofMr4i4RUb8WPhBEKtSJv0SyhtIntpN8LLxV e7PictSw3LafbzUFuzvaXswPIXI/kMdsJi4alcL5xcdPj8xN MIME-Version: 1.0 X-Received: by 2002:a05:6e02:8aa:: with SMTP id a10mr13493652ilt.157.1611853103590; Thu, 28 Jan 2021 08:58:23 -0800 (PST) Date: Thu, 28 Jan 2021 08:58:23 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000ab74fb05b9f8cb0a@google.com> Subject: BUG: corrupted list in io_file_get From: syzbot To: axboe@kernel.dk, io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, viro@zeniv.linux.org.uk 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: 76c057c8 Merge branch 'parisc-5.11-2' of git://git.kernel... git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11959454d00000 kernel config: https://syzkaller.appspot.com/x/.config?x=96b123631a6700e9 dashboard link: https://syzkaller.appspot.com/bug?extid=6879187cf57845801267 compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12a3872cd00000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ab17a4d00000 The issue was bisected to: commit 02a13674fa0e8dd326de8b9f4514b41b03d99003 Author: Jens Axboe Date: Sat Jan 23 22:49:31 2021 +0000 io_uring: account io_uring internal files as REQ_F_INFLIGHT bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14d1bf44d00000 final oops: https://syzkaller.appspot.com/x/report.txt?x=16d1bf44d00000 console output: https://syzkaller.appspot.com/x/log.txt?x=12d1bf44d00000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+6879187cf57845801267@syzkaller.appspotmail.com Fixes: 02a13674fa0e ("io_uring: account io_uring internal files as REQ_F_INFLIGHT") list_add double add: new=ffff888017eaa080, prev=ffff88801a9cb520, next=ffff888017eaa080. ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:29! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8481 Comm: syz-executor556 Not tainted 5.11.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__list_add_valid.cold+0x26/0x3c lib/list_debug.c:29 Code: 04 c3 fb fa 4c 89 e1 48 c7 c7 e0 de 9e 89 e8 9e 43 f3 ff 0f 0b 48 89 f2 4c 89 e1 48 89 ee 48 c7 c7 20 e0 9e 89 e8 87 43 f3 ff <0f> 0b 48 89 f1 48 c7 c7 a0 df 9e 89 4c 89 e6 e8 73 43 f3 ff 0f 0b RSP: 0018:ffffc90000fef938 EFLAGS: 00010086 RAX: 0000000000000058 RBX: ffff888017eaa000 RCX: 0000000000000000 RDX: ffff88801f3ed340 RSI: ffffffff815b6285 RDI: fffff520001fdf19 RBP: ffff888017eaa080 R08: 0000000000000058 R09: 0000000000000000 R10: ffffffff815af45e R11: 0000000000000000 R12: ffff888017eaa080 R13: ffff888014901900 R14: ffff88801a9cb000 R15: ffff88801a9cb520 FS: 0000000002395880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff04f95b6c0 CR3: 000000001a4f2000 CR4: 0000000000350ef0 Call Trace: __list_add include/linux/list.h:67 [inline] list_add include/linux/list.h:86 [inline] io_file_get+0x8cc/0xdb0 fs/io_uring.c:6466 __io_splice_prep+0x1bc/0x530 fs/io_uring.c:3866 io_splice_prep fs/io_uring.c:3920 [inline] io_req_prep+0x3546/0x4e80 fs/io_uring.c:6081 io_queue_sqe+0x609/0x10d0 fs/io_uring.c:6628 io_submit_sqe fs/io_uring.c:6705 [inline] io_submit_sqes+0x1495/0x2720 fs/io_uring.c:6953 __do_sys_io_uring_enter+0x107d/0x1f30 fs/io_uring.c:9353 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440569 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffe38c5c5a8 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 0000000000401e00 RCX: 0000000000440569 RDX: 0000000000000000 RSI: 000000000000450c RDI: 0000000000000004 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000401d70 R13: 0000000000401e00 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 3c68392a0f24e7a0 ]--- RIP: 0010:__list_add_valid.cold+0x26/0x3c lib/list_debug.c:29 Code: 04 c3 fb fa 4c 89 e1 48 c7 c7 e0 de 9e 89 e8 9e 43 f3 ff 0f 0b 48 89 f2 4c 89 e1 48 89 ee 48 c7 c7 20 e0 9e 89 e8 87 43 f3 ff <0f> 0b 48 89 f1 48 c7 c7 a0 df 9e 89 4c 89 e6 e8 73 43 f3 ff 0f 0b RSP: 0018:ffffc90000fef938 EFLAGS: 00010086 RAX: 0000000000000058 RBX: ffff888017eaa000 RCX: 0000000000000000 RDX: ffff88801f3ed340 RSI: ffffffff815b6285 RDI: fffff520001fdf19 RBP: ffff888017eaa080 R08: 0000000000000058 R09: 0000000000000000 R10: ffffffff815af45e R11: 0000000000000000 R12: ffff888017eaa080 R13: ffff888014901900 R14: ffff88801a9cb000 R15: ffff88801a9cb520 FS: 0000000002395880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ff04f95b6c0 CR3: 000000001a4f2000 CR4: 0000000000350ef0 --- 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