syzbot


stack segment fault in del_gendisk

Status: upstream: reported C repro on 2021/10/24 20:20
Reported-by: syzbot+50fb3546b9fcc451fe74@syzkaller.appspotmail.com
First crash: 408d, last: 129d

Sample crash report:
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007ffd4a143b10 R11: 0000000000000246 R12: 00007ffd4a1440ac
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
---[ end trace c717db188b6e9506 ]---
stack segment: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 302 Comm: syz-executor363 Tainted: G        W         5.4.180-syzkaller-00007-g4b9ad0dbd7ec #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:kill_device drivers/base/core.c:3022 [inline]
RIP: 0010:device_del+0x9f/0xf40 drivers/base/core.c:3049
Code: 74 08 4c 89 e7 e8 11 6e 10 ff 48 89 5c 24 10 41 bf c8 00 00 00 4d 03 3c 24 4c 89 fd 48 c1 ed 03 48 b8 00 00 00 00 00 fc ff df <8a> 44 05 00 84 c0 0f 85 17 0e 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffff8881de9e7cb8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103c59f21b
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff8881de9e7c78
RBP: 0000000000000019 R08: dffffc0000000000 R09: ffffed103bd3cf90
R10: ffffed103bd3cf90 R11: 1ffff1103bd3cf8f R12: ffff8881e2cf90d8
R13: ffff8881e2cf9070 R14: ffff8881e2cf9110 R15: 00000000000000c8
FS:  0000555557027300(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4a6b3ad130 CR3: 00000001dee86000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 del_gendisk+0x93f/0xb60 block/genhd.c:835
 loop_remove+0x42/0xa0 drivers/block/loop.c:2189
 loop_control_ioctl+0x547/0x600 drivers/block/loop.c:2288
 do_vfs_ioctl+0x6d1/0x15b0 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+0x44/0xa9
RIP: 0033:0x7f4a6b33c079
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd4a144098 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000005c78 RCX: 00007f4a6b33c079
RDX: 0000000000000000 RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 00007ffd4a143b10 R11: 0000000000000246 R12: 00007ffd4a1440ac
R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace c717db188b6e9507 ]---
RIP: 0010:kill_device drivers/base/core.c:3022 [inline]
RIP: 0010:device_del+0x9f/0xf40 drivers/base/core.c:3049
Code: 74 08 4c 89 e7 e8 11 6e 10 ff 48 89 5c 24 10 41 bf c8 00 00 00 4d 03 3c 24 4c 89 fd 48 c1 ed 03 48 b8 00 00 00 00 00 fc ff df <8a> 44 05 00 84 c0 0f 85 17 0e 00 00 41 0f b6 1f 89 de 83 e6 01 31
RSP: 0018:ffff8881de9e7cb8 EFLAGS: 00010202
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 1ffff1103c59f21b
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffff8881de9e7c78
RBP: 0000000000000019 R08: dffffc0000000000 R09: ffffed103bd3cf90
R10: ffffed103bd3cf90 R11: 1ffff1103bd3cf8f R12: ffff8881e2cf90d8
R13: ffff8881e2cf9070 R14: ffff8881e2cf9110 R15: 00000000000000c8
FS:  0000555557027300(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4a6b3ad130 CR3: 00000001dee86000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	74 08                	je     0xa
   2:	4c 89 e7             	mov    %r12,%rdi
   5:	e8 11 6e 10 ff       	callq  0xff106e1b
   a:	48 89 5c 24 10       	mov    %rbx,0x10(%rsp)
   f:	41 bf c8 00 00 00    	mov    $0xc8,%r15d
  15:	4d 03 3c 24          	add    (%r12),%r15
  19:	4c 89 fd             	mov    %r15,%rbp
  1c:	48 c1 ed 03          	shr    $0x3,%rbp
  20:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  27:	fc ff df
* 2a:	8a 44 05 00          	mov    0x0(%rbp,%rax,1),%al <-- trapping instruction
  2e:	84 c0                	test   %al,%al
  30:	0f 85 17 0e 00 00    	jne    0xe4d
  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 (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-android-5-4-kasan 2022/04/27 19:46 android12-5.4 4b9ad0dbd7ec 1fa34c1b .config log report syz C stack segment fault in del_gendisk
ci2-android-5-4-kasan 2022/04/27 00:58 android12-5.4 99f7ebe8ce34 1fa34c1b .config log report syz C stack segment fault in del_gendisk
ci2-android-5-4-kasan 2021/10/25 04:53 android12-5.4 eb4a5a5dbd5b 4f0000ee .config log report syz C stack segment fault in del_gendisk
ci2-android-5-4-kasan 2021/10/24 20:19 android12-5.4 eb4a5a5dbd5b 282f03fb .config log report syz C stack segment fault in del_gendisk
ci2-android-5-4-kasan 2022/07/31 08:48 android12-5.4 2bde2e268ec7 fef302b1 .config log report info stack segment fault in del_gendisk
ci2-android-5-4-kasan 2022/06/17 14:25 android12-5.4 77dc925ddffb cb58b3b2 .config log report info stack segment fault in del_gendisk
ci2-android-5-4-kasan 2022/04/26 09:06 android12-5.4 99f7ebe8ce34 1fa34c1b .config log report info stack segment fault in del_gendisk
ci2-android-5-4-kasan 2021/11/30 18:22 android12-5.4 0bbc71d87f4d 80270552 .config log report info stack segment fault in del_gendisk
* Struck through repros no longer work on HEAD.