syzbot


general protection fault in io_sqpoll_wq_cpu_affinity

Status: fixed on 2023/10/12 12:48
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+c74fea926a78b8a91042@syzkaller.appspotmail.com
Fix commit: bd6fc5da4c51 io_uring: Don't set affinity on a dying sqpoll thread
First crash: 276d, last: 263d
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] io_uring: Don't set affinity on a dying sqpoll thread 4 (4) 2023/08/29 17:37
[syzbot] [io-uring?] general protection fault in io_sqpoll_wq_cpu_affinity 0 (1) 2023/08/28 09:59

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000011d: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000008e8-0x00000000000008ef]
CPU: 0 PID: 32331 Comm: syz-executor.2 Not tainted 6.5.0-syzkaller-12145-g4a0fc73da97e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
RIP: 0010:io_sqpoll_wq_cpu_affinity+0x81/0xc0 io_uring/sqpoll.c:433
Code: a8 00 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 0f 0e 1f f7 bb e8 08 00 00 49 03 1c 24 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 f0 0d 1f f7 48 8b 3b 4c 89 f6 e8
RSP: 0000:ffffc9000af17dc8 EFLAGS: 00010206
RAX: 000000000000011d RBX: 00000000000008e8 RCX: ffff88807b190000
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001
RBP: 0000000000000002 R08: ffff888055269813 R09: 1ffff1100aa4d302
R10: dffffc0000000000 R11: ffffed100aa4d303 R12: ffff8880552698a8
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888055269800
FS:  00007f726995d6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffceb12eba8 CR3: 0000000026ad4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __io_register_iowq_aff+0x94/0xd0 io_uring/io_uring.c:4207
 io_unregister_iowq_aff io_uring/io_uring.c:4247 [inline]
 __io_uring_register io_uring/io_uring.c:4453 [inline]
 __do_sys_io_uring_register io_uring/io_uring.c:4539 [inline]
 __se_sys_io_uring_register+0xf30/0x1470 io_uring/io_uring.c:4499
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f726ae7cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f726995d0c8 EFLAGS: 00000246 ORIG_RAX: 00000000000001ab
RAX: ffffffffffffffda RBX: 00007f726af9c120 RCX: 00007f726ae7cae9
RDX: 0000000000000000 RSI: 0000000000000012 RDI: 0000000000000003
RBP: 00007f726aec847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f726af9c120 R15: 00007ffdfd138928
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:io_sqpoll_wq_cpu_affinity+0x81/0xc0 io_uring/sqpoll.c:433
Code: a8 00 00 00 4c 89 e0 48 c1 e8 03 42 80 3c 28 00 74 08 4c 89 e7 e8 0f 0e 1f f7 bb e8 08 00 00 49 03 1c 24 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 f0 0d 1f f7 48 8b 3b 4c 89 f6 e8
RSP: 0000:ffffc9000af17dc8 EFLAGS: 00010206
RAX: 000000000000011d RBX: 00000000000008e8 RCX: ffff88807b190000
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001
RBP: 0000000000000002 R08: ffff888055269813 R09: 1ffff1100aa4d302
R10: dffffc0000000000 R11: ffffed100aa4d303 R12: ffff8880552698a8
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888055269800
FS:  00007f726995d6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f79b3975198 CR3: 0000000026ad4000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	a8 00                	test   $0x0,%al
   2:	00 00                	add    %al,(%rax)
   4:	4c 89 e0             	mov    %r12,%rax
   7:	48 c1 e8 03          	shr    $0x3,%rax
   b:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  10:	74 08                	je     0x1a
  12:	4c 89 e7             	mov    %r12,%rdi
  15:	e8 0f 0e 1f f7       	call   0xf71f0e29
  1a:	bb e8 08 00 00       	mov    $0x8e8,%ebx
  1f:	49 03 1c 24          	add    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 f0 0d 1f f7       	call   0xf71f0e29
  39:	48 8b 3b             	mov    (%rbx),%rdi
  3c:	4c 89 f6             	mov    %r14,%rsi
  3f:	e8                   	.byte 0xe8

Crashes (33):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/08 10:19 upstream 4a0fc73da97e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/08 09:36 upstream 4a0fc73da97e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/07 15:16 upstream 7ba2090ca64e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/07 04:04 upstream 744a759492b5 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/07 03:47 upstream 744a759492b5 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/06 15:23 upstream 65d6e954e378 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/06 05:56 upstream 7733171926cc 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/06 00:26 upstream 7733171926cc 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/05 18:05 upstream 3f86ed6ec0b3 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/05 05:12 upstream 3f86ed6ec0b3 0b6286dc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/04 16:21 upstream 708283abf896 db3306a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/04 06:29 upstream db906f0ca6bb 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/04 01:56 upstream db906f0ca6bb 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/03 05:06 upstream 92901222f83d 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/03 04:44 upstream 92901222f83d 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 23:00 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 21:15 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 20:58 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 19:26 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 18:24 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 17:52 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 13:15 upstream 0468be89b3fa 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/02 01:14 upstream b84acc11b1c9 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/01 23:39 upstream 99d99825fc07 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/01 15:05 upstream 99d99825fc07 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/01 13:52 upstream 99d99825fc07 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/01 13:19 upstream 99d99825fc07 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/01 12:54 upstream 99d99825fc07 696ea0d2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce general protection fault in io_sqpoll_wq_cpu_affinity
2023/08/31 02:20 upstream ef2a0b7cdbc5 84803932 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/08/30 21:51 upstream 6c1b980a7e79 84803932 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in io_sqpoll_wq_cpu_affinity
2023/09/04 16:44 upstream 708283abf896 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 general protection fault in io_sqpoll_wq_cpu_affinity
2023/08/25 19:22 linux-next 626932085009 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
2023/08/25 19:18 linux-next 626932085009 03d9c195 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in io_sqpoll_wq_cpu_affinity
* Struck through repros no longer work on HEAD.