syzbot


general protection fault in del_gendisk

Status: upstream: reported C repro on 2022/12/24 00:28
Reported-by: syzbot+6bbe34fc87953b72ac13@syzkaller.appspotmail.com
First crash: 156d, last: 17d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 general protection fault in del_gendisk (5) C done 1 323d 323d 0/2 closed as dup on 2022/07/11 15:32
android-5-10 general protection fault in del_gendisk (4) C done 1 357d 355d 0/2 closed as dup on 2022/06/08 16:47
android-5-10 general protection fault in del_gendisk (7) C error inconclusive 18 47d 157d 0/2 upstream: reported C repro on 2022/12/22 23:51
android-5-10 general protection fault in del_gendisk (2) C error 2 397d 397d 0/2 closed as invalid on 2022/05/05 22:31
android-5-10 general protection fault in del_gendisk (3) C done 1 372d 372d 0/2 closed as invalid on 2022/06/03 17:43
android-5-10 general protection fault in del_gendisk (6) C done 1 239d 236d 0/2 closed as dup on 2022/10/05 23:44
android-5-10 general protection fault in del_gendisk C error 1 460d 567d 0/2 closed as invalid on 2022/03/02 21:49
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/05/12 15:05 11m retest repro android12-5.4 report log

Sample crash report:
 ksys_ioctl fs/ioctl.c:742 [inline]
 __do_sys_ioctl fs/ioctl.c:749 [inline]
 __se_sys_ioctl fs/ioctl.c:747 [inline]
 __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747
 do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1
---[ end trace 7c922977edc3bb57 ]---
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 308 Comm: syz-executor313 Tainted: G        W         5.4.219-syzkaller-00012-ga8aad8851131 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:kill_device drivers/base/core.c:3022 [inline]
RIP: 0010:device_del+0xe7/0x1000 drivers/base/core.c:3049
Code: df e8 4d 6f 04 ff 4c 89 7c 24 18 41 bf c8 00 00 00 48 89 5c 24 08 4c 03 3b 4d 89 fc 49 c1 ec 03 48 b8 00 00 00 00 00 fc ff df <41> 8a 04 04 84 c0 0f 85 88 0e 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffff8881ddaf79a0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8881dda110d8 RCX: 1ffff1103bb4221b
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff8881ddaf7920
RBP: ffff8881ddaf7a70 R08: dffffc0000000000 R09: ffffed103bb5ef25
R10: ffffed103bb5ef25 R11: 1ffff1103bb5ef24 R12: 0000000000000019
R13: ffff8881dda11070 R14: ffff8881dda11110 R15: 00000000000000c8
FS:  0000555556de2300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f26cd705130 CR3: 00000001e2b18000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 del_gendisk+0x99c/0xbf0 block/genhd.c:835
 loop_remove+0x42/0xa0 drivers/block/loop.c:2194
 loop_control_ioctl+0x67f/0x740 drivers/block/loop.c:2293
 do_vfs_ioctl+0x744/0x1730 fs/ioctl.c:47
 ksys_ioctl fs/ioctl.c:742 [inline]
 __do_sys_ioctl fs/ioctl.c:749 [inline]
 __se_sys_ioctl fs/ioctl.c:747 [inline]
 __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747
 do_syscall_64+0xcb/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Modules linked in:
---[ end trace 7c922977edc3bb58 ]---
RIP: 0010:kill_device drivers/base/core.c:3022 [inline]
RIP: 0010:device_del+0xe7/0x1000 drivers/base/core.c:3049
Code: df e8 4d 6f 04 ff 4c 89 7c 24 18 41 bf c8 00 00 00 48 89 5c 24 08 4c 03 3b 4d 89 fc 49 c1 ec 03 48 b8 00 00 00 00 00 fc ff df <41> 8a 04 04 84 c0 0f 85 88 0e 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffff8881ddaf79a0 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: ffff8881dda110d8 RCX: 1ffff1103bb4221b
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff8881ddaf7920
RBP: ffff8881ddaf7a70 R08: dffffc0000000000 R09: ffffed103bb5ef25
R10: ffffed103bb5ef25 R11: 1ffff1103bb5ef24 R12: 0000000000000019
R13: ffff8881dda11070 R14: ffff8881dda11110 R15: 00000000000000c8
FS:  0000555556de2300(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f26cd705130 CR3: 00000001e2b18000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	df e8                	fucomip %st(0),%st
   2:	4d 6f                	rex.WRB outsl %ds:(%rsi),(%dx)
   4:	04 ff                	add    $0xff,%al
   6:	4c 89 7c 24 18       	mov    %r15,0x18(%rsp)
   b:	41 bf c8 00 00 00    	mov    $0xc8,%r15d
  11:	48 89 5c 24 08       	mov    %rbx,0x8(%rsp)
  16:	4c 03 3b             	add    (%rbx),%r15
  19:	4d 89 fc             	mov    %r15,%r12
  1c:	49 c1 ec 03          	shr    $0x3,%r12
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	41 8a 04 04          	mov    (%r12,%rax,1),%al <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 88 0e 00 00    	jne    0xebe
  36:	41 0f b6 1f          	movzbl (%r15),%ebx
  3a:	89 de                	mov    %ebx,%esi
  3c:	83 e6 01             	and    $0x1,%esi
  3f:	31                   	.byte 0x31

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Manager Title
2022/12/24 00:40 android12-5.4 a8aad8851131 9da18ae8 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in del_gendisk
2023/02/13 13:54 android12-5.4 6a5ec6cea0cd 957959cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in del_gendisk
2022/12/26 23:04 android12-5.4 a8aad8851131 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in del_gendisk
2022/12/25 06:35 android12-5.4 a8aad8851131 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in del_gendisk
2022/12/24 00:27 android12-5.4 a8aad8851131 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in del_gendisk
* Struck through repros no longer work on HEAD.