syzbot


general protection fault in kernfs_find_ns

Status: upstream: reported C repro on 2023/09/09 18:30
Reported-by: syzbot+c03842d041f269840123@syzkaller.appspotmail.com
First crash: 439d, last: 47d
Fix bisection: failed (error log, bisect log)
  
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 1088d 1083d 0/28 auto-closed as invalid on 2022/03/29 00:22
android-54 general protection fault in kernfs_find_ns 1 1280d 1280d 0/2 auto-closed as invalid on 2021/09/18 09:16
android-54 general protection fault in kernfs_find_ns (2) C 21 220d 1123d 0/2 upstream: reported C repro on 2021/10/24 20:02
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/11/09 23:24 5m retest repro android13-5.10-lts report log
2024/10/25 02:35 5m retest repro android13-5.10-lts report log
2024/10/05 02:09 5m retest repro android13-5.10-lts report log
2024/08/30 20:52 8m retest repro android13-5.10-lts report log
2024/08/16 00:04 13m retest repro android13-5.10-lts report log
2024/07/12 16:50 5m retest repro android13-5.10-lts report log
2024/06/21 19:00 13m retest repro android13-5.10-lts report log
2024/06/06 22:03 4m retest repro android13-5.10-lts report log
2024/05/03 16:18 4m retest repro android13-5.10-lts error
2024/03/30 17:07 10m retest repro android13-5.10-lts report log
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/11/05 23:09 0m bisect fix android13-5.10-lts error job log
2024/09/18 23:06 42m bisect fix android13-5.10-lts OK (0) job log log
2024/07/20 23:09 57m bisect fix android13-5.10-lts OK (0) job log log
2024/05/23 19:22 2h36m bisect fix android13-5.10-lts OK (0) job log log
2024/04/19 04:46 1h03m bisect fix android13-5.10-lts OK (0) job log log
2024/02/12 18:43 35m bisect fix android13-5.10-lts OK (0) job log log
2024/01/13 06:39 48m bisect fix android13-5.10-lts OK (0) job log log

Sample crash report:
RBP: 0000000000000002 R08: 00000000000000a0 R09: 00000000000000a0
R10: 00007ffc2ca91846 R11: 0000000000000246 R12: 00007ffc2ca91abc
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
---[ end trace 69abe628f50f1ac5 ]---
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 449 Comm: syz-executor851 Tainted: G        W         5.10.209-syzkaller-00435-gdd976ecce2ce #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:strlen+0x2c/0x70 lib/string.c:568
Code: 89 e5 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:ffffc90000d67b98 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000001
RDX: ffff8881102713c0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000d67bb8 R08: ffffffff81d2f3ab R09: ffffed102000b22f
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  00005555572ea380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4305d47c40 CR3: 000000010ff1e000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kernfs_name_hash fs/kernfs/dir.c:309 [inline]
 kernfs_find_ns+0x95/0x4a0 fs/kernfs/dir.c:880
 kernfs_remove_by_name_ns+0x87/0x160 fs/kernfs/dir.c:1580
 kernfs_remove_by_name include/linux/kernfs.h:623 [inline]
 sysfs_remove_link+0x50/0x60 fs/sysfs/symlink.c:152
 del_gendisk+0x87b/0xa90 block/genhd.c:951
 loop_remove+0x46/0xb0 drivers/block/loop.c:2210
 loop_control_ioctl+0x564/0x620 drivers/block/loop.c:2309
 vfs_ioctl fs/ioctl.c:48 [inline]
 __do_sys_ioctl fs/ioctl.c:753 [inline]
 __se_sys_ioctl+0x114/0x190 fs/ioctl.c:739
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:739
 do_syscall_64+0x34/0x70
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7f4305d14d39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc2ca91aa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffc2ca91ac0 RCX: 00007f4305d14d39
RDX: 000000000000000b RSI: 0000000000004c81 RDI: 0000000000000003
RBP: 0000000000000002 R08: 00000000000000a0 R09: 00000000000000a0
R10: 00007ffc2ca91846 R11: 0000000000000246 R12: 00007ffc2ca91abc
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
Modules linked in:
---[ end trace 69abe628f50f1ac6 ]---
RIP: 0010:strlen+0x2c/0x70 lib/string.c:568
Code: 89 e5 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:ffffc90000d67b98 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: dffffc0000000001
RDX: ffff8881102713c0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000d67bb8 R08: ffffffff81d2f3ab R09: ffffed102000b22f
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffffffffffff
R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000
FS:  00005555572ea380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4305d47c40 CR3: 000000010ff1e000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	89 e5                	mov    %esp,%ebp
   2:	41 57                	push   %r15
   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 (13):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/02 15:37 android13-5.10-lts dd976ecce2ce 25905f5d .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/09/30 18:32 android13-5.10-lts a27512601c2d 8e26a358 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/09/30 04:36 android13-5.10-lts a27512601c2d 8e26a358 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/09/09 18:19 android13-5.10-lts a27512601c2d 6654cf89 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/12/13 00:51 android13-5.10-lts 98ed22fdc25f ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/11/30 20:07 android13-5.10-lts 0da9a7bcb7a2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/11/19 03:27 android13-5.10-lts d30b996835c0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/11/15 16:13 android13-5.10-lts d30b996835c0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/11/15 10:10 android13-5.10-lts d30b996835c0 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/11/05 03:25 android13-5.10-lts d30b996835c0 500bfdc4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/10/19 01:30 android13-5.10-lts a27512601c2d 342b9c55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/10/06 23:37 android13-5.10-lts a27512601c2d ea12a918 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
2023/09/09 17:57 android13-5.10-lts a27512601c2d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-10 general protection fault in kernfs_find_ns
* Struck through repros no longer work on HEAD.