syzbot


general protection fault in d_splice_alias

Status: upstream: reported C repro on 2025/02/03 19:48
Subsystems: udf
[Documentation on labels]
Reported-by: syzbot+a9c0867e4d1dd0c7ab19@syzkaller.appspotmail.com
Fix commit: 902e09c8acde fix braino in "9p: fix ->rename_sem exclusion"
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-arm32 ci-qemu2-riscv64]
First crash: 56d, last: 52d
Cause bisection: introduced by (bisect log) :
commit 30d61efe118cad1a73ad2ad66a3298e4abdf9f41
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Mon Jan 6 02:33:17 2025 +0000

  9p: fix ->rename_sem exclusion

Crash: BUG: unable to handle kernel NULL pointer dereference in d_splice_alias (log)
Repro: C syz .config
  
Fix bisection: fixed by (bisect log) :
commit 902e09c8acde117b00369521f54df817a983d4ab
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Mon Feb 3 21:16:09 2025 +0000

  fix braino in "9p: fix ->rename_sem exclusion"

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [udf?] general protection fault in d_splice_alias 2 (5) 2025/03/06 21:12
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/02/18 23:05 1h03m retest repro upstream OK log
2025/02/04 00:11 14m eadavis@qq.com patch upstream error

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc000000000d: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f]
CPU: 0 UID: 0 PID: 11921 Comm: syz.4.1860 Not tainted 6.14.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:__d_unalias fs/dcache.c:2969 [inline]
RIP: 0010:d_splice_alias+0x9cd/0xf30 fs/dcache.c:3037
Code: 48 c1 ea 03 80 3c 02 00 0f 85 4e 05 00 00 49 8b 85 70 ff ff ff 48 ba 00 00 00 00 00 fc ff df 48 8d 78 68 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 14 05 00 00 48 8b 40 68 48 85 c0 74 31 48 89 44
RSP: 0018:ffffc900040e76e8 EFLAGS: 00010212
RAX: 0000000000000000 RBX: ffff888056477d60 RCX: 000000000000000d
RDX: dffffc0000000000 RSI: ffffffff8234b06c RDI: 0000000000000068
RBP: ffff88805494a138 R08: 0000000000000000 R09: ffffed100ac8ee4b
R10: ffff88805647725b R11: 00000000000000c3 R12: ffff8880564771a0
R13: ffff88805647db98 R14: ffff88805647da70 R15: ffff88805647db08
FS:  00007f0b6266d6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000055bf2000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 udf_lookup+0x191/0x240 fs/udf/namei.c:130
 __lookup_slow+0x252/0x470 fs/namei.c:1793
 lookup_slow fs/namei.c:1810 [inline]
 walk_component+0x350/0x5b0 fs/namei.c:2114
 link_path_walk.part.0.constprop.0+0x669/0xd40 fs/namei.c:2479
 link_path_walk fs/namei.c:2411 [inline]
 path_parentat+0xaa/0x1b0 fs/namei.c:2683
 __filename_parentat+0x22d/0x680 fs/namei.c:2707
 filename_parentat fs/namei.c:2725 [inline]
 do_renameat2+0x25a/0xdd0 fs/namei.c:5138
 __do_sys_rename fs/namei.c:5273 [inline]
 __se_sys_rename fs/namei.c:5271 [inline]
 __x64_sys_rename+0x7d/0xa0 fs/namei.c:5271
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0b6178cda9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f0b6266d038 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f0b619a6080 RCX: 00007f0b6178cda9
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000020000000
RBP: 00007f0b6180e2a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f0b619a6080 R15: 00007ffc29bd3628
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__d_unalias fs/dcache.c:2969 [inline]
RIP: 0010:d_splice_alias+0x9cd/0xf30 fs/dcache.c:3037
Code: 48 c1 ea 03 80 3c 02 00 0f 85 4e 05 00 00 49 8b 85 70 ff ff ff 48 ba 00 00 00 00 00 fc ff df 48 8d 78 68 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 14 05 00 00 48 8b 40 68 48 85 c0 74 31 48 89 44
RSP: 0018:ffffc900040e76e8 EFLAGS: 00010212
RAX: 0000000000000000 RBX: ffff888056477d60 RCX: 000000000000000d
RDX: dffffc0000000000 RSI: ffffffff8234b06c RDI: 0000000000000068
RBP: ffff88805494a138 R08: 0000000000000000 R09: ffffed100ac8ee4b
R10: ffff88805647725b R11: 00000000000000c3 R12: ffff8880564771a0
R13: ffff88805647db98 R14: ffff88805647da70 R15: ffff88805647db08
FS:  00007f0b6266d6c0(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000055bf2000 CR4: 0000000000350ef0
----------------
Code disassembly (best guess):
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 4e 05 00 00    	jne    0x55c
   e:	49 8b 85 70 ff ff ff 	mov    -0x90(%r13),%rax
  15:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  1c:	fc ff df
  1f:	48 8d 78 68          	lea    0x68(%rax),%rdi
  23:	48 89 f9             	mov    %rdi,%rcx
  26:	48 c1 e9 03          	shr    $0x3,%rcx
* 2a:	80 3c 11 00          	cmpb   $0x0,(%rcx,%rdx,1) <-- trapping instruction
  2e:	0f 85 14 05 00 00    	jne    0x548
  34:	48 8b 40 68          	mov    0x68(%rax),%rax
  38:	48 85 c0             	test   %rax,%rax
  3b:	74 31                	je     0x6e
  3d:	48                   	rex.W
  3e:	89                   	.byte 0x89
  3f:	44                   	rex.R

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/04 02:23 upstream 2014c95afece a21a8419 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/02/04 02:23 upstream 2014c95afece a21a8419 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/02/03 09:24 upstream 69e858e0b8b2 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/02/03 09:24 upstream 69e858e0b8b2 568559e4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/02/01 06:13 upstream 69e858e0b8b2 aa47157c .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 08:12 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 08:12 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 08:12 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 07:48 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 07:41 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 07:41 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 05:02 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 05:02 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 03:40 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
2025/01/31 03:40 upstream b4b0881156fb 4c6ac32f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root general protection fault in d_splice_alias
* Struck through repros no longer work on HEAD.