panic: Caught invalid memory access at ffff800039743178 size 4 op 0 Stopped at db_enter+0x17: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND 484275 93632 0 0x2 0 1 syz-executor *348039 64624 0 0x14000 0x200 0K reaper db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff846330ad) at panic+0x270 sys/kern/subr_prf.c:198 __asan_load4_noabort(ffff800039743178) at __asan_load4_noabort+0xa3 witness_checkorder(ffff800039743158,9,0) at witness_checkorder+0x111 sys/kern/subr_witness.c:779 mtx_enter(ffff800039743148) at mtx_enter+0x105 sys/kern/kern_lock.c:406 knote_processexit(ffff800039743040) at knote_processexit+0x43 sys/kern/kern_event.c:2236 reaper(ffff8000298a5c90) at reaper+0x38d sys/kern/kern_exit.c:515 end trace frame: 0x0, count: 8 https://www.openbsd.org/ddb.html describes the minimum info required in bug reports. Insufficient info makes it difficult to find and fix bugs. ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: Caught invalid memory access at ffff800039743178 size 4 op 0 ddb{0}> show kasan KASAN: invalid read of 4 bytes at 0xffff800039743178 from pc 0xffffffff83560921 KASAN: first bad byte at 0xffff800039743178 (+0); shadow 0xfd: pool use-after-free (or unallocated item) KASAN: 0xffff800039743178 is 312 bytes inside the 1232-byte item [0xffff800039743040..0xffff800039743510) in pool 'processpl' KASAN: allocated at: #0 pool_get+0x770 sys/kern/subr_pool.c:733 #1 process_new+0x47 sys/kern/kern_fork.c:221 #2 fork1+0x533 sys/kern/kern_fork.c:408 #3 syscall+0x1089 mi_syscall sys/sys/syscall_mi.h:176 [inline] #3 syscall+0x1089 sys/arch/amd64/amd64/trap.c:783 #4 Xsyscall+0x128 KASAN: freed at: #0 pool_put+0x79 sys/kern/subr_pool.c:918 #1 process_zap+0x457 sys/kern/kern_exit.c:898 #2 dowait6+0x10dd sys/kern/kern_exit.c:578 #3 sys_wait4+0x244 sys/kern/kern_exit.c:719 #4 syscall+0x1089 mi_syscall sys/sys/syscall_mi.h:176 [inline] #4 syscall+0x1089 sys/arch/amd64/amd64/trap.c:783 #5 Xsyscall+0x128 KASAN: pc: witness_checkorder+0x111 KASAN: call trace: #0 __asan_load4_noabort+0x82 kasan_shadow_check sys/kern/subr_kasan.c:1014 [inline] #0 __asan_load4_noabort+0x82 sys/kern/subr_kasan.c:1098 #1 witness_checkorder+0x111 sys/kern/subr_witness.c:779 #2 mtx_enter+0x105 sys/kern/kern_lock.c:406 #3 knote_processexit+0x43 sys/kern/kern_event.c:2236 #4 reaper+0x38d sys/kern/kern_exit.c:515 #5 proc_trampoline+0x10 KASAN: shadow of 0xffff800039743000..0xffff800039743280 (1 cell = 8 bytes): 0xffff800039743000: fd fd fd fd fd fd fd fd 08 08 fd fd fd fd fd fd 0xffff800039743080: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd >0xffff800039743100: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd[fd] 0xffff800039743180: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0xffff800039743200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd KASAN: legend: 00 valid; 01..07 partial; fb malloc redzone; fc malloc freed; fd pool freed; fe kmem; fa global; f1..f4/f8 stack/scope ddb{0}> trace db_enter() at db_enter+0x17 sys/arch/amd64/amd64/db_interface.c:457 panic(ffffffff846330ad) at panic+0x270 sys/kern/subr_prf.c:198 __asan_load4_noabort(ffff800039743178) at __asan_load4_noabort+0xa3 witness_checkorder(ffff800039743158,9,0) at witness_checkorder+0x111 sys/kern/subr_witness.c:779 mtx_enter(ffff800039743148) at mtx_enter+0x105 sys/kern/kern_lock.c:406 knote_processexit(ffff800039743040) at knote_processexit+0x43 sys/kern/kern_event.c:2236 reaper(ffff8000298a5c90) at reaper+0x38d sys/kern/kern_exit.c:515 end trace frame: 0x0, count: -7 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000298a2ed0 rbx 0xffff8000298a2f40 rdx 0 rcx 0xffffffff84f02ff0 cpu_info_full_primary+0x1ff0 rax 0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xffff8000298a2cb8 r11 0xffffffff82b69490 x86_bus_space_io_read_1 r12 0xffffffff846330ad .str.16+0x9a5ad r13 0xffffffff84f03c08 cpu_info_full_primary+0x2c08 r14 0xffffffff84f03e07 cpu_info_full_primary+0x2e07 r15 0x1 rip 0xffffffff829a9a77 db_enter+0x17 cs 0x8 rflags 0x246 rsp 0xffff8000298a2ed0 ss 0x10 db_enter+0x17: popq %rbp ddb{0}> show proc PROC (reaper) tid=348039 pid=64624 tcnt=1 stat=onproc flags process=14000 proc=200 runpri=32, usrpri=56, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff800045fff9f0,0xffff8000298a5a08 process=0xffff8000298121b0 user=0xffff800029898000, vmspace=0xffffffff85e37800 estcpu=6, cpticks=39, pctcpu=0.16, user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 57826 277728 70832 0 2 0x10 0xc80 syz-executor 57826 117038 70832 0 3 0x10 0x4000080 kqpoll syz-executor 57826 210143 70832 0 3 0x10 0x4000080 fsleep syz-executor 76414 14345 10116 0 2 0 0 syz-executor 76414 49873 10116 0 2 0 0x4000000 syz-executor 57719 266888 1 0 3 0x2 0x80 nanoslp getty 10116 264295 95451 0 2 0x2 0xc80 syz-executor 70832 129226 95451 0 2 0x2 0xc80 syz-executor 5145 463884 95451 0 3 0x2 0x80 piperd syz-executor 63556 402954 95451 0 3 0x2 0x80 piperd syz-executor 9607 82870 95451 0 3 0x2 0x80 piperd syz-executor 93632 484275 95451 0 7 0x2 0 syz-executor 95451 351838 1 0 3 0x2 0x80 wait syz-executor 70510 64970 0 0 3 0x14000 0x200 bored smr 71049 134667 0 0 2 0x14000 0x200 zerothread 13064 341226 0 0 3 0x14000 0x200 aiodoned aiodoned 79671 429273 0 0 2 0x14000 0xe00 update 89516 127449 0 0 3 0x14000 0x200 cleaner cleaner *64624 348039 0 0 7 0x14000 0x200 reaper 4217 144401 0 0 3 0x14000 0x200 pgdaemon pagedaemon 73881 20976 0 0 3 0x14000 0x200 bored viomb 20136 464664 0 0 3 0x14000 0x40000200 acpi0 acpi0 52624 142285 0 0 3 0x14000 0x40000200 idle1 65393 451331 0 0 3 0x14000 0x200 bored softnet1 93484 67560 0 0 3 0x14000 0x200 bored softnet0 23195 463829 0 0 2 0x14000 0x200 systqmp 78214 234445 0 0 3 0x14000 0x200 bored systq 9648 16937 0 0 2 0x14000 0x200 softclockmp 67978 91649 0 0 3 0x14000 0x40000200 tmoslp softclock 96029 69190 0 0 3 0x14000 0x40000200 idle0 1 439481 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10000 0x200 scheduler swapper ddb{0}>