syzbot


general protection fault in io_uring_register

Status: fixed on 2022/03/08 16:11
Subsystems: fs io-uring
[Documentation on labels]
Reported-by: syzbot+337de45f13a4fd54d708@syzkaller.appspotmail.com
Fix commit: 41d3a6bd1d37 io_uring: pin SQPOLL data before unlocking ring lock
First crash: 1199d, last: 1199d
Cause bisection: introduced by (bisect log) :
commit fa84693b3c896460831fe0750554121121a23da8
Author: Jens Axboe <axboe@kernel.dk>
Date: Wed Sep 1 20:15:59 2021 +0000

  io_uring: ensure IORING_REGISTER_IOWQ_MAX_WORKERS works with SQPOLL

Crash: general protection fault in io_uring_register (log)
Repro: syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] general protection fault in io_uring_register 1 (3) 2021/09/14 01:04
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/09/13 19:11 26m axboe@kernel.dk git://git.kernel.dk/linux-block io_uring-5.15 OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000103: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000818-0x000000000000081f]
CPU: 0 PID: 12816 Comm: syz-executor.1 Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:io_register_iowq_max_workers fs/io_uring.c:10552 [inline]
RIP: 0010:__io_uring_register fs/io_uring.c:10757 [inline]
RIP: 0010:__do_sys_io_uring_register+0x10e9/0x2e70 fs/io_uring.c:10792
Code: ea 03 80 3c 02 00 0f 85 43 1b 00 00 48 8b 9b a8 00 00 00 b8 ff ff 37 00 48 c1 e0 2a 48 8d bb 18 08 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 11 1b 00 00 48 8b 9b 18 08 00 00 48 85 db 0f 84
RSP: 0018:ffffc90003f3fdf8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000103 RSI: 0000000000000004 RDI: 0000000000000818
RBP: ffff888073777900 R08: 0000000000000000 R09: ffff88807e916413
R10: ffffed100fd22c82 R11: 0000000000000001 R12: 0000000000000000
R13: ffffc90003f3fec8 R14: 1ffff920007e7fc9 R15: ffff88805cd7e000
FS:  00007f6c631e3700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000001907808 CR3: 0000000062c6d000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 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:0x4665f9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f6c631e3188 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 000000000056c038 RCX: 00000000004665f9
RDX: 0000000020004000 RSI: 0000000000000013 RDI: 0000000000000003
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 000000000056c038
R13: 00007ffdd807e0af R14: 00007f6c631e3300 R15: 0000000000022000
Modules linked in:
---[ end trace 1cd60a7726ee853d ]---
RIP: 0010:io_register_iowq_max_workers fs/io_uring.c:10552 [inline]
RIP: 0010:__io_uring_register fs/io_uring.c:10757 [inline]
RIP: 0010:__do_sys_io_uring_register+0x10e9/0x2e70 fs/io_uring.c:10792
Code: ea 03 80 3c 02 00 0f 85 43 1b 00 00 48 8b 9b a8 00 00 00 b8 ff ff 37 00 48 c1 e0 2a 48 8d bb 18 08 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 11 1b 00 00 48 8b 9b 18 08 00 00 48 85 db 0f 84
RSP: 0018:ffffc90003f3fdf8 EFLAGS: 00010206
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000103 RSI: 0000000000000004 RDI: 0000000000000818
RBP: ffff888073777900 R08: 0000000000000000 R09: ffff88807e916413
R10: ffffed100fd22c82 R11: 0000000000000001 R12: 0000000000000000
R13: ffffc90003f3fec8 R14: 1ffff920007e7fc9 R15: ffff88805cd7e000
FS:  00007f6c631e3700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb988f6b000 CR3: 0000000062c6d000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	03 80 3c 02 00 0f    	add    0xf00023c(%rax),%eax
   6:	85 43 1b             	test   %eax,0x1b(%rbx)
   9:	00 00                	add    %al,(%rax)
   b:	48 8b 9b a8 00 00 00 	mov    0xa8(%rbx),%rbx
  12:	b8 ff ff 37 00       	mov    $0x37ffff,%eax
  17:	48 c1 e0 2a          	shl    $0x2a,%rax
  1b:	48 8d bb 18 08 00 00 	lea    0x818(%rbx),%rdi
  22:	48 89 fa             	mov    %rdi,%rdx
  25:	48 c1 ea 03          	shr    $0x3,%rdx
* 29:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2d:	0f 85 11 1b 00 00    	jne    0x1b44
  33:	48 8b 9b 18 08 00 00 	mov    0x818(%rbx),%rbx
  3a:	48 85 db             	test   %rbx,%rbx
  3d:	0f                   	.byte 0xf
  3e:	84                   	.byte 0x84

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/09 19:52 upstream a3fa7a101dcf e2776ee4 .config console log report syz ci-upstream-kasan-gce general protection fault in io_uring_register
* Struck through repros no longer work on HEAD.