syzbot


BUG: unable to handle kernel paging request in io_arm_poll_handler

Status: fixed on 2023/04/27 11:31
Reported-by: syzbot+c6fa569a57598e8d8d14@syzkaller.appspotmail.com
Fix commit: f4ba55411cc8 io_uring: avoid null-ptr-deref in io_arm_poll_handler
First crash: 422d, last: 413d
Fix bisection: fixed by (bisect log) :
commit f4ba55411cc8ffa883df861ce79af4bd35885b11
Author: Fedor Pchelkin <pchelkin@ispras.ru>
Date: Thu Mar 16 18:56:16 2023 +0000

  io_uring: avoid null-ptr-deref in io_arm_poll_handler

  

Sample crash report:
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 <unknown>:584
Unable to handle kernel paging request at virtual address dfff800000000002
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006
  CM = 0, WnR = 0
[dfff800000000002] address between user and kernel address ranges
Internal error: Oops: 96000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 4057 Comm: syz-executor304 Not tainted 5.15.101-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : io_arm_poll_handler+0x270/0xa9c io_uring/io_uring.c:5940
lr : kmalloc include/linux/slab.h:591 [inline]
lr : io_arm_poll_handler+0x264/0xa9c io_uring/io_uring.c:5939
sp : ffff80001cb97700
x29: ffff80001cb977b0 x28: ffff700003972ee4 x27: dfff800000000000
x26: 0000000000000014 x25: ffff0000c7668e18 x24: 0000000000000000
x23: ffff80001cb97740 x22: ffff0000c7668e08 x21: 000000004000004b
x20: 1fffe00018ecd1c1 x19: ffff0000c7668dc0 x18: 0000000000000001
x17: ff808000083386a0 x16: ffff8000082ed0d4 x15: ffff8000083386a0
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000aa0cd64 x10: 1fffe00018476a09 x9 : 26f7e54f4f1a4f00
x8 : 0000000000000002 x7 : 0000000000000000 x6 : 0000000000000001
x5 : ffff80001cb96b98 x4 : 0000000000000a20 x3 : 0000000000000a20
x2 : 0000000000000048 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 io_arm_poll_handler+0x270/0xa9c io_uring/io_uring.c:5940
 __io_queue_sqe+0xa8/0x31c io_uring/io_uring.c:7214
 io_queue_sqe io_uring/io_uring.c:7242 [inline]
 io_submit_sqe io_uring/io_uring.c:7419 [inline]
 io_submit_sqes+0x10e0/0x8da8 io_uring/io_uring.c:7525
 __do_sys_io_uring_enter io_uring/io_uring.c:10254 [inline]
 __se_sys_io_uring_enter io_uring/io_uring.c:10196 [inline]
 __arm64_sys_io_uring_enter+0x2a0/0x1df4 io_uring/io_uring.c:10196
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
 el0t_64_sync+0x1a0/0x1a4 <unknown>:584
Code: 977d5e74 9100501a aa0003f8 d343ff48 (38fb6908) 
---[ end trace b578cafa481c0c7d ]---
----------------
Code disassembly (best guess):
   0:	977d5e74 	bl	0xfffffffffdf579d0
   4:	9100501a 	add	x26, x0, #0x14
   8:	aa0003f8 	mov	x24, x0
   c:	d343ff48 	lsr	x8, x26, #3
* 10:	38fb6908 	ldrsb	w8, [x8, x27] <-- trapping instruction

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/13 04:56 linux-5.15.y bbf9f29bac04 5205ef30 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/16 01:27 linux-5.15.y 2ddbd0f967b3 18b58603 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/14 03:17 linux-5.15.y 2ddbd0f967b3 026e2200 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/13 05:38 linux-5.15.y bbf9f29bac04 5205ef30 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/12 22:20 linux-5.15.y bbf9f29bac04 5205ef30 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/12 06:33 linux-5.15.y d214f240b0f6 5205ef30 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/12 03:17 linux-5.15.y d214f240b0f6 5205ef30 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/19 01:15 linux-5.15.y 8020ae3c051d 7939252e .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/21 12:09 linux-5.15.y 8020ae3c051d 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/15 15:04 linux-5.15.y 2ddbd0f967b3 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
2023/03/13 04:37 linux-5.15.y bbf9f29bac04 5205ef30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 BUG: unable to handle kernel paging request in io_arm_poll_handler
* Struck through repros no longer work on HEAD.