syzbot


general protection fault in pidfs_free_pid

Status: upstream: reported C repro on 2025/06/23 18:27
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+25317a459958aec47bfa@syzkaller.appspotmail.com
First crash: 4d00h, last: 3h23m
Cause bisection: introduced by (bisect log) :
commit fb0b3e2b2d7f213cb4fde623706f9ed6d748a373
Author: Christian Brauner <brauner@kernel.org>
Date: Wed Jun 18 20:53:46 2025 +0000

  pidfs: support xattrs on pidfds

Crash: BUG: unable to handle kernel NULL pointer dereference in pidfs_free_pid (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] general protection fault in pidfs_free_pid 4 (9) 2025/06/24 10:52
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/06/24 08:45 40m brauner@kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-6.17.pidfs OK log
2025/06/24 09:24 27m brauner@kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs-6.17.pidfs OK log
2025/06/24 00:56 44m hdanton@sina.com patch linux-next OK log

Sample crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.16.0-rc2-next-20250620-syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:pidfs_free_pid+0xaf/0x140 fs/pidfs.c:162
Code: f0 ff ff 73 e4 43 80 3c 3c 00 74 08 4c 89 f7 e8 67 19 de ff 49 83 3e 00 0f 85 84 00 00 00 e8 78 ee 79 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 42 19 de ff 4c 8b 33 4d 85 f6 74
RSP: 0018:ffffc90000a08b90 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801ceada00
RDX: 0000000000000100 RSI: 0000000000000001 RDI: ffff8880745f4370
RBP: 0000000000000001 R08: ffff8880745f4303 R09: 1ffff1100e8be860
R10: dffffc0000000000 R11: ffffed100e8be861 R12: 1ffff1100e8be86d
R13: ffffffff81a8bfb4 R14: ffff8880745f4368 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888125d26000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcc2d1bf28 CR3: 00000000745f2000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 put_pid+0x9c/0x130 kernel/pid.c:103
 rcu_do_batch kernel/rcu/tree.c:2582 [inline]
 rcu_core+0xca5/0x1710 kernel/rcu/tree.c:2838
 handle_softirqs+0x286/0x870 kernel/softirq.c:579
 __do_softirq kernel/softirq.c:613 [inline]
 invoke_softirq kernel/softirq.c:453 [inline]
 __irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82
Code: 43 dd 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 83 d5 1a 00 f3 0f 1e fa fb f4 <e9> 18 dd 02 00 cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90000197de0 EFLAGS: 000002c6
RAX: 5ef6bd65ac57ee00 RBX: ffffffff81975fd8 RCX: 5ef6bd65ac57ee00
RDX: 0000000000000001 RSI: ffffffff8d991d22 RDI: ffffffff8be320a0
RBP: ffffc90000197f20 R08: ffff8880b8732f1b R09: 1ffff110170e65e3
R10: dffffc0000000000 R11: ffffed10170e65e4 R12: ffffffff8fa193f0
R13: 0000000000000001 R14: 0000000000000001 R15: 1ffff110039d5b40
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:749
 default_idle_call+0x74/0xb0 kernel/sched/idle.c:122
 cpuidle_idle_call kernel/sched/idle.c:190 [inline]
 do_idle+0x1e8/0x510 kernel/sched/idle.c:330
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:428
 start_secondary+0x101/0x110 arch/x86/kernel/smpboot.c:315
 common_startup_64+0x13e/0x147
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:pidfs_free_pid+0xaf/0x140 fs/pidfs.c:162
Code: f0 ff ff 73 e4 43 80 3c 3c 00 74 08 4c 89 f7 e8 67 19 de ff 49 83 3e 00 0f 85 84 00 00 00 e8 78 ee 79 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 42 19 de ff 4c 8b 33 4d 85 f6 74
RSP: 0018:ffffc90000a08b90 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88801ceada00
RDX: 0000000000000100 RSI: 0000000000000001 RDI: ffff8880745f4370
RBP: 0000000000000001 R08: ffff8880745f4303 R09: 1ffff1100e8be860
R10: dffffc0000000000 R11: ffffed100e8be861 R12: 1ffff1100e8be86d
R13: ffffffff81a8bfb4 R14: ffff8880745f4368 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888125d26000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcc2d1bf28 CR3: 00000000745f2000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	f0 ff                	lock (bad)
   2:	ff 73 e4             	push   -0x1c(%rbx)
   5:	43 80 3c 3c 00       	cmpb   $0x0,(%r12,%r15,1)
   a:	74 08                	je     0x14
   c:	4c 89 f7             	mov    %r14,%rdi
   f:	e8 67 19 de ff       	call   0xffde197b
  14:	49 83 3e 00          	cmpq   $0x0,(%r14)
  18:	0f 85 84 00 00 00    	jne    0xa2
  1e:	e8 78 ee 79 ff       	call   0xff79ee9b
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 38 00       	cmpb   $0x0,(%rax,%r15,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 42 19 de ff       	call   0xffde197b
  39:	4c 8b 33             	mov    (%rbx),%r14
  3c:	4d 85 f6             	test   %r14,%r14
  3f:	74                   	.byte 0x74

Crashes (990):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/21 21:54 linux-next 5d4809e25903 d6cdfb8a .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 02:20 linux-next 5d4809e25903 d6cdfb8a .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/22 13:45 linux-next 5d4809e25903 d6cdfb8a .config console log report syz / log [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 09:59 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 09:33 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 08:31 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 08:22 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 07:04 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 06:50 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 05:45 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 05:14 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 04:08 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 03:33 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 02:28 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 01:54 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 01:48 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/24 00:43 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 23:54 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 22:52 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 22:34 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 21:34 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 20:27 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 20:06 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 18:46 linux-next f817b6dd2b62 1a7fb460 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 17:28 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 17:02 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 15:23 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 14:04 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 13:03 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 11:57 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 11:38 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 10:23 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 09:35 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 08:29 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 08:24 linux-next f817b6dd2b62 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 07:06 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 06:05 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 05:32 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 04:29 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 04:22 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 03:18 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 01:47 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 01:42 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 00:38 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
2025/06/23 00:01 linux-next 5d4809e25903 d6cdfb8a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root general protection fault in pidfs_free_pid
* Struck through repros no longer work on HEAD.