syzbot


general protection fault in kernfs_name_hash

Status: upstream: reported C repro on 2022/07/10 02:13
Reported-by: syzbot+95f079df0dbb98d86bd3@syzkaller.appspotmail.com
First crash: 678d, last: 466d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 general protection fault in kernfs_name_hash (3) C done 3 704d 704d 0/2 closed as dup on 2022/06/14 17:09
android-5-10 general protection fault in kernfs_name_hash (4) C done 2 700d 700d 0/2 closed as dup on 2022/07/11 15:27
android-5-10 general protection fault in kernfs_name_hash C done 2 761d 761d 0/2 closed as invalid on 2022/05/10 19:54
android-5-10 general protection fault in kernfs_name_hash (2) C done 3 722d 722d 0/2 closed as dup on 2022/05/26 23:28
android-5-10 general protection fault in kernfs_name_hash (5) C done 3 616d 642d 0/2 closed as dup on 2022/09/14 21:01
android-5-10 general protection fault in kernfs_name_hash (6) C error error 22 424d 590d 0/2 auto-obsoleted due to no activity on 2023/07/19 13:32
Last patch testing requests (7)
Created Duration User Patch Repo Result
2024/04/27 09:45 5m retest repro android12-5.4 report log
2024/02/16 17:08 13m retest repro android12-5.4 report log
2023/12/08 16:16 5m retest repro android12-5.4 report log
2023/09/29 15:08 4m retest repro android12-5.4 report log
2023/07/21 12:13 12m retest repro android12-5.4 report log
2023/05/12 11:58 27m retest repro android12-5.4 OK log
2023/05/12 11:58 12m 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 0e0bec924c313ccf ]---
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: 0 PID: 308 Comm: syz-executor443 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:strlen+0x2a/0x60 lib/string.c:552
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881e086f9c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881dd835e80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b9a329 R09: ffffed103c10df3d
R10: ffffed103c10df3d R11: 1ffff1103c10df3c R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  000055555750f300(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f57c5fed130 CR3: 00000001de2a9000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kernfs_name_hash+0x1e/0x220 fs/kernfs/dir.c:310
 kernfs_find_ns+0x6b/0x260 fs/kernfs/dir.c:855
 kernfs_remove_by_name_ns+0x32/0x90 fs/kernfs/dir.c:1517
 del_gendisk+0x98a/0xbf0 block/genhd.c:833
 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 0e0bec924c313cd0 ]---
RIP: 0010:strlen+0x2a/0x60 lib/string.c:552
Code: 41 57 41 56 41 54 53 49 89 fe 48 c7 c0 ff ff ff ff 49 bf 00 00 00 00 00 fc ff df 48 89 fb 66 90 49 89 c4 48 89 d8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 75 12 48 ff c3 49 8d 44 24 01 43 80 7c 26 01
RSP: 0018:ffff8881e086f9c0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881dd835e80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81b9a329 R09: ffffed103c10df3d
R10: ffffed103c10df3d R11: 1ffff1103c10df3c R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  000055555750f300(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f57c5fed130 CR3: 00000001de2a9000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	41 57                	push   %r15
   2:	41 56                	push   %r14
   4:	41 54                	push   %r12
   6:	53                   	push   %rbx
   7:	49 89 fe             	mov    %rdi,%r14
   a:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
  11:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
  18:	fc ff df
  1b:	48 89 fb             	mov    %rdi,%rbx
  1e:	66 90                	xchg   %ax,%ax
  20:	49 89 c4             	mov    %rax,%r12
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 38       	movzbl (%rax,%r15,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	75 12                	jne    0x45
  33:	48 ff c3             	inc    %rbx
  36:	49 8d 44 24 01       	lea    0x1(%r12),%rax
  3b:	43                   	rex.XB
  3c:	80                   	.byte 0x80
  3d:	7c 26                	jl     0x65
  3f:	01                   	.byte 0x1

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/22 23:29 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 kernfs_name_hash
2022/07/10 02:42 android12-5.4 569d38047a0f b5765a15 .config strace log report syz C ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/02/07 11:52 android12-5.4 6a5ec6cea0cd 5bc3be51 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/02/03 18:36 android12-5.4 6a5ec6cea0cd 1b2f701a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/01/13 01:08 android12-5.4 a0eae55f26a0 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/01/12 14:10 android12-5.4 4a947285bcca 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/01/12 05:41 android12-5.4 4a947285bcca 96166539 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2023/01/04 20:33 android12-5.4 a8aad8851131 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/12/31 17:09 android12-5.4 a8aad8851131 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/12/22 23:19 android12-5.4 a8aad8851131 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/09/25 13:44 android12-5.4 def19b1cf16c 0042f2b4 .config console log report info [disk image] [vmlinux] ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/07/30 02:37 android12-5.4 2bde2e268ec7 fef302b1 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/07/26 06:11 android12-5.4 397b3ca493cb 34795c51 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_name_hash
2022/07/10 02:12 android12-5.4 569d38047a0f b5765a15 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_name_hash
* Struck through repros no longer work on HEAD.