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: 7733 Comm: syz.4.402 Not tainted 6.16.0-rc3-next-20250623-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 a7 1b de ff 49 83 3e 00 0f 85 84 00 00 00 e8 08 f2 79 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 82 1b de ff 4c 8b 33 4d 85 f6 74
RSP: 0018:ffffc90000a08b90 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888020391e00
RDX: 0000000000000100 RSI: 0000000000000001 RDI: ffff8880245ee670
RBP: 0000000000000001 R08: ffff8880245ee603 R09: 1ffff110048bdcc0
R10: dffffc0000000000 R11: ffffed10048bdcc1 R12: 1ffff110048bdccd
R13: ffffffff81a83684 R14: ffff8880245ee668 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff888125d25000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30003ff8 CR3: 000000007c458000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000000e DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
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+0x283/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
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:36 [inline]
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:24 [inline]
RIP: 0010:lock_acquire+0x39/0x360 kernel/locking/lockdep.c:5834
Code: 83 ec 60 4d 89 ce 45 89 c7 41 89 cc 89 54 24 04 89 f3 49 89 fd 48 8b ac 24 98 00 00 00 65 48 8b 05 2c 05 02 11 48 89 44 24 58 <0f> 1f 44 00 00 65 8b 05 2f 05 02 11 83 f8 08 0f 83 b8 01 00 00 89
RSP: 0018:ffffc9000404f218 EFLAGS: 00000286
RAX: 9f90dbdb5d094a00 RBX: 0000000000000000 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8e13dea0
RBP: ffffffff81729c65 R08: 0000000000000000 R09: 0000000000000000
R10: ffffc9000404f3d8 R11: ffffffff81ac7670 R12: 0000000000000002
R13: ffffffff8e13dea0 R14: 0000000000000000 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:841 [inline]
class_rcu_constructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0xc2/0x2390 arch/x86/kernel/unwind_orc.c:479
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free mm/slub.c:4680 [inline]
kfree+0x18e/0x440 mm/slub.c:4879
snd_rawmidi_free_substreams sound/core/rawmidi.c:1916 [inline]
snd_rawmidi_free+0x207/0x410 sound/core/rawmidi.c:1931
snd_rawmidi_dev_free+0x38/0x50 sound/core/rawmidi.c:1945
__snd_device_free+0x1d5/0x2e0 sound/core/device.c:76
snd_device_free_all+0xcf/0x180 sound/core/device.c:233
snd_card_do_free sound/core/init.c:587 [inline]
release_card_device+0x75/0x1b0 sound/core/init.c:153
device_release+0x9c/0x1c0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x22b/0x480 lib/kobject.c:737
snd_card_file_remove+0x347/0x3a0 sound/core/init.c:1119
snd_rawmidi_release+0xa8/0xc0 sound/core/rawmidi.c:613
__fput+0x449/0xa70 fs/file_table.c:468
task_work_run+0x1d4/0x260 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x6b5/0x2300 kernel/exit.c:959
do_group_exit+0x21c/0x2d0 kernel/exit.c:1100
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc4af58e929
Code: Unable to access opcode bytes at 0x7fc4af58e8ff.
RSP: 002b:00007fc4b049c0e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007fc4af7b6168 RCX: 00007fc4af58e929
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc4af7b6168
RBP: 00007fc4af7b6160 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc4af7b616c
R13: 0000000000000000 R14: 00007ffcc69d08f0 R15: 00007ffcc69d09d8
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 a7 1b de ff 49 83 3e 00 0f 85 84 00 00 00 e8 08 f2 79 ff 48 89 d8 48 c1 e8 03 <42> 80 3c 38 00 74 08 48 89 df e8 82 1b de ff 4c 8b 33 4d 85 f6 74
RSP: 0018:ffffc90000a08b90 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888020391e00
RDX: 0000000000000100 RSI: 0000000000000001 RDI: ffff8880245ee670
RBP: 0000000000000001 R08: ffff8880245ee603 R09: 1ffff110048bdcc0
R10: dffffc0000000000 R11: ffffed10048bdcc1 R12: 1ffff110048bdccd
R13: ffffffff81a83684 R14: ffff8880245ee668 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff888125d25000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b30003ff8 CR3: 000000007c458000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000000e DR6: 00000000ffff0ff0 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 a7 1b de ff call 0xffde1bbb
14: 49 83 3e 00 cmpq $0x0,(%r14)
18: 0f 85 84 00 00 00 jne 0xa2
1e: e8 08 f2 79 ff call 0xff79f22b
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 82 1b de ff call 0xffde1bbb
39: 4c 8b 33 mov (%rbx),%r14
3c: 4d 85 f6 test %r14,%r14
3f: 74 .byte 0x74