syzbot


general protection fault in debugfs_create_files

Status: fixed on 2019/03/06 07:43
Subsystems: block
[Documentation on labels]
Reported-by: syzbot+a9d09761be47db706560@syzkaller.appspotmail.com
Fix commit: 36991ca68db9 blk-mq: protect debugfs_create_files() from failures
First crash: 1939d, last: 1938d
Discussions (1)
Title Replies (including bot) Last reply
general protection fault in debugfs_create_files 3 (4) 2019/02/01 08:30

Sample crash report:
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: 8264 Comm: syz-executor060 Not tainted 5.0.0-rc4-next-20190130 #22
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:debugfs_create_files+0x2e/0x140 block/blk-mq-debugfs.c:842
Code: 41 56 49 89 fe 41 55 41 54 49 89 f4 53 48 89 d3 e8 87 d0 f3 fd 49 8d 7e 58 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e3 00 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffff88809331f868 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: ffffffff8881d400 RCX: ffffffff82d9f665
RDX: 0000000000000008 RSI: ffffffff838e48c9 RDI: 0000000000000047
RBP: ffff88809331f888 R08: ffff8880a0c76400 R09: fffffbfff13024e6
R10: fffffbfff13024e5 R11: ffffffff8981272b R12: ffff888099398ed0
R13: ffff888099398ed0 R14: ffffffffffffffef R15: ffff888099398f98
FS:  0000000001edd880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f835b5dc6f0 CR3: 00000000a0365000 CR4: 00000000001406e0
Call Trace:
 blk_mq_debugfs_register+0xec/0x4e0 block/blk-mq-debugfs.c:865
 blk_register_queue+0x1bc/0x370 block/blk-sysfs.c:944
 __device_add_disk+0xe9f/0x13c0 block/genhd.c:723
 device_add_disk+0x2b/0x40 block/genhd.c:739
 add_disk include/linux/genhd.h:422 [inline]
 loop_add+0x71d/0xa30 drivers/block/loop.c:1999
 loop_control_ioctl+0x18e/0x470 drivers/block/loop.c:2100
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:509 [inline]
 do_vfs_ioctl+0x107b/0x17d0 fs/ioctl.c:696
 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl fs/ioctl.c:718 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718
 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4420d9
Code: e8 6c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 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 0f 83 cb 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffddb7abd48 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004420d9
RDX: 0000000000000000 RSI: 0000000000004c80 RDI: 0000000000000003
RBP: 0000000000010555 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402f30
R13: 0000000000402fc0 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace 5909b82e24594aac ]---
RIP: 0010:debugfs_create_files+0x2e/0x140 block/blk-mq-debugfs.c:842
Code: 41 56 49 89 fe 41 55 41 54 49 89 f4 53 48 89 d3 e8 87 d0 f3 fd 49 8d 7e 58 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 e3 00 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffff88809331f868 EFLAGS: 00010203
RAX: dffffc0000000000 RBX: ffffffff8881d400 RCX: ffffffff82d9f665
RDX: 0000000000000008 RSI: ffffffff838e48c9 RDI: 0000000000000047
RBP: ffff88809331f888 R08: ffff8880a0c76400 R09: fffffbfff13024e6
R10: fffffbfff13024e5 R11: ffffffff8981272b R12: ffff888099398ed0
R13: ffff888099398ed0 R14: ffffffffffffffef R15: ffff888099398f98
FS:  0000000001edd880(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f835b5dc6f0 CR3: 00000000a0365000 CR4: 00000000001406e0

Crashes (111):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/01/30 14:52 linux-next 02495e76ded5 aa432daf .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/01/30 14:25 linux-next 02495e76ded5 aa432daf .config console log report syz ci-upstream-linux-next-kasan-gce-root
2019/02/01 04:06 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/02/01 00:27 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 22:42 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 20:14 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 19:25 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 16:29 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 14:53 linux-next 9fe36dd579c7 0e8ea0a3 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 13:17 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 12:13 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 10:21 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 08:51 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 07:08 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 06:26 linux-next 9fe36dd579c7 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 04:23 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/31 01:03 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 22:21 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 20:31 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 15:59 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 15:20 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 15:18 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 12:35 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:47 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:46 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:46 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:33 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:31 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:18 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:08 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 10:08 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:49 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:45 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:42 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:41 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:39 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:34 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:34 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:33 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:21 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:07 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 09:01 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 08:54 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 08:43 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 08:38 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 08:35 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
2019/01/30 08:33 linux-next 02495e76ded5 aa432daf .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.