syzbot


BUG: corrupted list in io_file_get

Status: fixed on 2021/03/10 01:48
Subsystems: fs io-uring
[Documentation on labels]
Reported-by: syzbot+6879187cf57845801267@syzkaller.appspotmail.com
Fix commit: f609cbb8911e io_uring: fix list corruption for splice file_get
First crash: 1238d, last: 1237d
Cause bisection: introduced by (bisect log) :
commit 02a13674fa0e8dd326de8b9f4514b41b03d99003
Author: Jens Axboe <axboe@kernel.dk>
Date: Sat Jan 23 22:49:31 2021 +0000

  io_uring: account io_uring internal files as REQ_F_INFLIGHT

Crash: BUG: corrupted list in io_file_get (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[PATCH 5.10 00/54] 5.10.16-rc1 review 68 (68) 2021/02/17 22:45
[PATCH 0/2] io_uring-file req cancel syzbot reports 3 (3) 2021/01/28 18:39
BUG: corrupted list in io_file_get 3 (4) 2021/01/28 17:28

Sample crash report:
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

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/01/28 11:31 upstream 76c057c84d28 eefc07f2 .config console log report syz C ci-upstream-kasan-gce-root BUG: corrupted list in io_file_get
2021/01/28 18:56 upstream 76c057c84d28 7df34f59 .config console log report info ci-upstream-kasan-gce BUG: corrupted list in io_file_get
2021/01/28 11:07 upstream 76c057c84d28 eefc07f2 .config console log report info ci-upstream-kasan-gce-root BUG: corrupted list in io_file_get
* Struck through repros no longer work on HEAD.