syzbot


general protection fault in kernfs_find_ns (2)

Status: upstream: reported C repro on 2021/10/24 20:02
Reported-by: syzbot+d1074aaa6bf5e1eb925c@syzkaller.appspotmail.com
First crash: 912d, last: 9d00h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in kernfs_find_ns kernfs 2 877d 872d 0/26 auto-closed as invalid on 2022/03/29 00:22
android-54 general protection fault in kernfs_find_ns 1 1069d 1069d 0/2 auto-closed as invalid on 2021/09/18 09:16
android-5-10 general protection fault in kernfs_find_ns C 13 5d12h 228d 0/2 upstream: reported C repro on 2023/09/09 18:30
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/04/15 17:40 13m retest repro android12-5.4 report log
2024/03/04 12:41 5m retest repro android12-5.4 report log
2024/02/19 18:14 12m retest repro android12-5.4 report log
2024/02/05 17:27 11m retest repro android12-5.4 report log
2023/12/25 12:08 22m retest repro android12-5.4 report log
2023/12/11 17:17 12m retest repro android12-5.4 report log
2023/11/25 23:54 21m retest repro android12-5.4 report log
2023/10/16 11:43 12m retest repro android12-5.4 report log
2023/10/02 14:51 6m retest repro android12-5.4 report log
2023/08/07 11:24 16m retest repro android12-5.4 report log

Sample crash report:
 do_vfs_ioctl+0x742/0x1720 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+0xca/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1
---[ end trace ae600c39d8473f17 ]---
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: 365 Comm: syz-executor348 Tainted: G        W         5.4.254-syzkaller-00011-g2ac128c04e33 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:strlen+0x28/0x60 lib/string.c:552
Code: 40 00 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 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:ffff8881dc567a00 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81bd683c R09: ffffed103b8acf41
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000555557010380(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005576f45cd068 CR3: 00000001dc4f2000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kernfs_name_hash fs/kernfs/dir.c:310 [inline]
 kernfs_find_ns+0x83/0x440 fs/kernfs/dir.c:855
 kernfs_remove_by_name_ns+0x37/0x100 fs/kernfs/dir.c:1517
 del_gendisk+0x9c7/0xc30 block/genhd.c:833
 loop_remove+0x42/0xa0 drivers/block/loop.c:2194
 loop_control_ioctl+0x564/0x620 drivers/block/loop.c:2293
 do_vfs_ioctl+0x742/0x1720 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+0xca/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Modules linked in:
---[ end trace ae600c39d8473f18 ]---
RIP: 0010:strlen+0x28/0x60 lib/string.c:552
Code: 40 00 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 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:ffff8881dc567a00 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81bd683c R09: ffffed103b8acf41
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000555557010380(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005576f45cd068 CR3: 00000001dc4f2000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	40 00 41 57          	rex add %al,0x57(%rcx)
   4:	41 56                	push   %r14
   6:	41 54                	push   %r12
   8:	53                   	push   %rbx
   9:	49 89 fe             	mov    %rdi,%r14
   c:	48 c7 c0 ff ff ff ff 	mov    $0xffffffffffffffff,%rax
  13:	49 bf 00 00 00 00 00 	movabs $0xdffffc0000000000,%r15
  1a:	fc ff df
  1d:	48 89 fb             	mov    %rdi,%rbx
  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 (21):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/11 23:48 android12-5.4 2ac128c04e33 6d6dbf8a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/09/18 13:46 android12-5.4 19cff29fe49c 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/12/20 17:50 android12-5.4 5b673be0c6b0 021b36cb .config console log report syz C ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/12/27 23:38 android12-5.4 c0585bc7c835 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/09/18 13:22 android12-5.4 19cff29fe49c 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/05/29 11:24 android12-5.4 10e0626a3202 cf184559 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/04/30 06:56 android12-5.4 d5ed2ca98e48 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2023/04/29 20:42 android12-5.4 d5ed2ca98e48 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/04/01 20:22 android12-5.4 61c005f0f166 79a2a8fc .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/03/30 21:46 android12-5.4 ed043095f483 42718dd6 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/03/29 11:24 android12-5.4 ed043095f483 6bdac766 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/03/08 19:27 android12-5.4 8a3679a75730 7bdd8b2c .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/03/02 05:32 android12-5.4 961dd91cc692 45a13a73 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/02/04 14:30 android12-5.4 287dec2d1089 a3e470b2 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/01/29 05:11 android12-5.4 57f9b292a6a3 495e00c5 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2022/01/18 20:01 android12-5.4 37c7c8d4f085 731a2d23 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/12/20 17:31 android12-5.4 5b673be0c6b0 021b36cb .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/11/30 05:15 android12-5.4 0bbc71d87f4d d0830353 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/11/23 18:16 android12-5.4 697fba25ed27 545ab074 .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/11/10 07:18 android12-5.4 f49f3b377eae 55fa030c .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
2021/10/24 20:01 android12-5.4 eb4a5a5dbd5b 282f03fb .config console log report info ci2-android-5-4-kasan general protection fault in kernfs_find_ns
* Struck through repros no longer work on HEAD.