panic: pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd807f02a600+16 0x0!=0x6530ca396058cf96 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 21980 46120 0 0 0 0 syz-executor.0 *321638 46120 0 0 0x4000000 1K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 pool_cache_get(ffffffff8265edd8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8265edd8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1892 pool_get() at pool_get+0x91 sys/kern/subr_pool.c:572 m_copym(fffffd806c9d8800,0,3b9aca00,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd806c9d8800,0,3b9aca00,2) at m_copym+0x174 sys/kern/uipc_mbuf.c:667 rtm_sendup(fffffd806f6ce000,fffffd806c9d8800,1) at rtm_sendup+0x5f sys/net/rtsock.c:588 route_input(fffffd806c9d8800,0,0) at route_input+0x1cc sys/net/rtsock.c:560 if_attachsetup(ffff800000b1c000) at if_attachsetup+0x2a9 sys/net/if.c:452 if_attach(ffff800000b1c000) at if_attach+0x50 sys/net/if.c:543 tun_create(ffffffff82466f10,c1,800) at tun_create+0x1d3 sys/net/if_tun.c:241 if_clone_create(ffff800023b92d60,0) at if_clone_create+0xc0 sys/net/if.c:1221 tapopen(5dc1,801,2000,ffff800020abe290) at tapopen+0xd1 sys/net/if_tun.c:342 spec_open(ffff800023b92e48) at spec_open+0x3ea sys/kern/spec_vnops.c:158 VOP_OPEN(fffffd8062908ea8,801,fffffd807f7c6a80,ffff800020abe290) at VOP_OPEN+0x6a sys/kern/vfs_vops.c:154 end trace frame: 0xffff800023b92fe0, count: 0 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd807f02a600+16 0x0!=0x6530ca396058cf96 ddb{1}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:207 pool_cache_get(ffffffff8265edd8) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8265edd8) at pool_cache_get+0x323 sys/kern/subr_pool.c:1892 pool_get() at pool_get+0x91 sys/kern/subr_pool.c:572 m_copym(fffffd806c9d8800,0,3b9aca00,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd806c9d8800,0,3b9aca00,2) at m_copym+0x174 sys/kern/uipc_mbuf.c:667 rtm_sendup(fffffd806f6ce000,fffffd806c9d8800,1) at rtm_sendup+0x5f sys/net/rtsock.c:588 route_input(fffffd806c9d8800,0,0) at route_input+0x1cc sys/net/rtsock.c:560 if_attachsetup(ffff800000b1c000) at if_attachsetup+0x2a9 sys/net/if.c:452 if_attach(ffff800000b1c000) at if_attach+0x50 sys/net/if.c:543 tun_create(ffffffff82466f10,c1,800) at tun_create+0x1d3 sys/net/if_tun.c:241 if_clone_create(ffff800023b92d60,0) at if_clone_create+0xc0 sys/net/if.c:1221 tapopen(5dc1,801,2000,ffff800020abe290) at tapopen+0xd1 sys/net/if_tun.c:342 spec_open(ffff800023b92e48) at spec_open+0x3ea sys/kern/spec_vnops.c:158 VOP_OPEN(fffffd8062908ea8,801,fffffd807f7c6a80,ffff800020abe290) at VOP_OPEN+0x6a sys/kern/vfs_vops.c:154 vn_open(ffff800023b93098,801,0) at vn_open+0x4eb sys/kern/vfs_vnops.c:186 doopenat(ffff800020abe290,ffffff9c,20000180,800,0,ffff800023b93290) at doopenat+0x28b sys/kern/vfs_syscalls.c:1157 syscall(ffff800023b93310) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800023b93310) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,0,ffffffffffffff9f,0,3,87562bd7010) at Xsyscall+0x128 end of kernel end trace frame: 0x877b5a0bef0, count: -18 ddb{1}> show registers rdi 0xffffffff820cd6c7 db_enter+0x17 rsi 0x3e02 __ALIGN_SIZE+0x2e02 rbp 0xffff800023b92890 rbx 0xffff800023b92940 rdx 0x3e03 __ALIGN_SIZE+0x2e03 rcx 0xffff800020b64000 rax 0xffff800020b64000 r8 0xffffffff814de02f kprintf+0x16f r9 0x1 r10 0x25 r11 0xd113a0134bfadf5f r12 0x3000000008 r13 0xffff800023b928a0 r14 0x100 r15 0x1 rip 0xffffffff820cd6c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023b92880 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=321638 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020abec70,0xffff800020abf660 process=0xffff800020adc000 user=0xffff800023b8e000, vmspace=0xfffffd807f00a8a0 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 51558 215033 13670 0 3 0x80 nanosleep syz-executor.1 51558 144247 13670 0 3 0x4000080 fsleep syz-executor.1 51558 405081 13670 0 3 0x4000080 fsleep syz-executor.1 46120 21980 80511 0 7 0 syz-executor.0 *46120 321638 80511 0 7 0x4000000 syz-executor.0 46120 5805 80511 0 3 0x4000080 fsleep syz-executor.0 13670 98247 10589 0 3 0x82 nanosleep syz-executor.1 80511 294995 10589 0 3 0x82 nanosleep syz-executor.0 10589 428922 89152 0 3 0x82 thrsleep syz-fuzzer 10589 230376 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 215252 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 96714 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 286514 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 307284 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 502733 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 232321 89152 0 3 0x4000082 kqread syz-fuzzer 10589 241012 89152 0 3 0x4000082 thrsleep syz-fuzzer 10589 368793 89152 0 3 0x4000082 thrsleep syz-fuzzer 89152 64973 54071 0 3 0x10008a pause ksh 54071 306199 78286 0 3 0x92 select sshd 40140 307712 1 0 3 0x100083 ttyin getty 78286 447953 1 0 3 0x80 select sshd 67263 315043 79475 74 3 0x100092 bpf pflogd 79475 48082 1 0 3 0x80 netio pflogd 87516 517001 44570 73 3 0x100090 kqread syslogd 44570 452571 1 0 3 0x100082 netio syslogd 52637 300078 1 77 3 0x100090 poll dhclient 97236 223385 1 0 3 0x80 poll dhclient 42892 452943 0 0 3 0x14200 pgzero zerothread 86841 56402 0 0 3 0x14200 aiodoned aiodoned 33405 236264 0 0 3 0x14200 syncer update 16540 388991 0 0 3 0x14200 cleaner cleaner 42380 424312 0 0 3 0x14200 reaper reaper 15584 290889 0 0 3 0x14200 pgdaemon pagedaemon 81989 369597 0 0 3 0x14200 bored crynlk 12722 141029 0 0 3 0x14200 bored crypto 21934 339052 0 0 3 0x40014200 acpi0 acpi0 33254 207735 0 0 3 0x40014200 idle1 53281 426727 0 0 3 0x14200 bored softnet 74266 496400 0 0 3 0x14200 bored systqmp 90686 185357 0 0 3 0x14200 bored systq 75319 341074 0 0 3 0x40014200 bored softclock 11899 271690 0 0 3 0x40014200 idle0 8328 209190 0 0 3 0x14200 bored smr 1 273117 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 46120 (syz-executor.0) thread 0xffff800020abe290 (321638) exclusive rwlock netlock r = 0 (0xffffffff824fc348) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 if_attach+0x25 sys/net/if.c:541 #2 tun_create+0x1d3 sys/net/if_tun.c:241 #3 if_clone_create+0xc0 sys/net/if.c:1221 #4 tapopen+0xd1 sys/net/if_tun.c:342 #5 spec_open+0x3ea sys/kern/spec_vnops.c:158 #6 VOP_OPEN+0x6a sys/kern/vfs_vops.c:154 #7 vn_open+0x4eb sys/kern/vfs_vnops.c:186 #8 doopenat+0x28b sys/kern/vfs_syscalls.c:1157 #9 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #9 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #10 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 1 (0xffffffff82622388) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 syscall+0x400 mi_syscall sys/sys/syscall_mi.h:83 [inline] #1 syscall+0x400 sys/arch/amd64/amd64/trap.c:555 #2 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9525 6474K 6911K 78643K 11104 0 0 pcb 13 8K 8K 78643K 55 0 0 rtable 76 4K 5K 78643K 343 0 0 ifaddr 60 12K 13K 78643K 91 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1484 0 0 iov 0 0K 16K 78643K 34 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 77K 77K 78643K 1371 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 5 0 0 VM map 8 4K 4K 78643K 8 0 0 sem 12 0K 1K 78643K 71 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 6 17K 25K 78643K 193 0 0 sigio 0 0K 0K 78643K 5 0 0 proc 60 63K 83K 78643K 430 0 0 subproc 32 2K 2K 78643K 34 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 10 0 0 in_multi 13 0K 2K 78643K 40 0 0 ether_multi 1 0K 0K 78643K 2 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 233 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 118 71K 72K 78643K 1612 0 0 UVM aobj 11 4K 4K 78643K 12 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 40 0 0 NDP 14 0K 0K 78643K 25 0 0 temp 177 3554K 3620K 78643K 15489 0 0 kqueue 0 0K 0K 78643K 4 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 11 0 8 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 37 0 33 1 0 1 1 0 8 0 rtentry 112 66 0 41 2 0 2 2 0 8 0 unpcb 120 131 0 121 1 0 1 1 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 262 0 258 2 1 1 2 0 8 0 inpcb 280 443 0 436 2 0 2 2 0 8 1 nd6 48 5 0 5 1 0 1 1 0 8 1 pkpcb 40 8 0 8 1 1 0 1 0 8 0 ppxss 1128 3 0 3 1 0 1 1 0 8 1 pffrag 232 2 0 2 1 1 0 1 0 482 0 pffrnode 88 2 0 2 1 1 0 1 0 8 0 pffrent 40 90 0 90 1 1 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 24 0 2 1 0 1 1 0 8 0 pfstkey 112 24 0 2 1 0 1 1 0 8 0 pfstate 328 24 0 2 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 3 0 2 3 1 2 3 0 8 1 art_heap4 256 278 0 150 14 1 13 14 0 8 1 art_table 32 281 0 152 2 0 2 2 0 8 0 art_node 16 65 0 42 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 16 1 0 1 1 0 8 1 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 69 0 59 1 0 1 1 0 8 0 shmpl 112 10 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1694 0 287 46 0 46 46 0 8 0 ffsino 272 1694 0 287 94 0 94 94 0 8 0 nchpl 144 2292 0 665 61 0 61 61 0 8 0 uvmvnodes 72 1845 0 0 34 0 34 34 0 8 0 vnodes 208 1845 0 0 98 0 98 98 0 8 0 namei 1024 6276 0 6276 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vcpupl 1984 6 0 0 1 0 1 1 0 8 0 vmpool 552 6 0 0 1 0 1 1 0 8 0 scxspl 192 6373 0 6373 8 2 6 7 0 8 6 plimitpl 152 29 0 21 1 0 1 1 0 8 0 sigapl 432 393 0 377 3 1 2 3 0 8 0 futexpl 56 4588 0 4585 1 0 1 1 0 8 0 knotepl 112 110 0 91 2 1 1 2 0 8 0 kqueuepl 104 105 0 103 1 0 1 1 0 8 0 pipepl 112 250 0 231 2 0 2 2 0 8 1 fdescpl 488 394 0 377 3 0 3 3 0 8 0 filepl 152 3050 0 2944 7 0 7 7 0 8 2 lockfpl 104 68 0 67 1 0 1 1 0 8 0 lockfspl 48 26 0 25 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 20 0 9 1 0 1 1 0 8 0 ucredpl 96 286 0 277 1 0 1 1 0 8 0 zombiepl 144 377 0 377 1 0 1 1 0 8 1 processpl 896 409 0 377 4 0 4 4 0 8 0 procpl 632 809 0 764 5 0 5 5 0 8 1 srpgc 64 2 0 2 1 1 0 1 0 8 0 sockpl 384 619 0 597 5 0 5 5 0 8 2 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 162 0 0 20 0 20 20 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 217 0 0 13 0 13 13 0 8 0 bufpl 256 6746 0 1319 340 0 340 340 0 8 0 anonpl 16 62740 0 44017 89 5 84 84 0 124 8 amapchunkpl 152 2532 0 2395 13 2 11 11 0 158 3 amappl16 192 2144 0 1103 55 1 54 54 0 8 1 amappl14 176 28 0 26 1 0 1 1 0 8 0 amappl13 168 88 0 85 1 0 1 1 0 8 0 amappl12 160 5 0 1 2 1 1 1 0 8 0 amappl11 152 56 0 41 1 0 1 1 0 8 0 amappl10 144 20 0 15 1 0 1 1 0 8 0 amappl9 136 713 0 703 1 0 1 1 0 8 0 amappl8 128 260 0 228 2 0 2 2 0 8 0 amappl7 120 39 0 35 1 0 1 1 0 8 0 amappl6 112 73 0 63 1 0 1 1 0 8 0 amappl5 104 133 0 119 1 0 1 1 0 8 0 amappl4 96 728 0 694 1 0 1 1 0 8 0 amappl3 88 119 0 114 1 0 1 1 0 8 0 amappl2 80 2228 0 2148 3 1 2 3 0 8 0 amappl1 72 18488 0 18020 25 15 10 20 0 8 0 amappl 80 1082 0 1036 2 0 2 2 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 11 0 1 1 0 1 1 0 8 0 uaddrrnd 24 400 0 377 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 400 0 377 1 0 1 1 0 8 0 vmmpekpl 168 7205 0 7169 2 0 2 2 0 8 0 vmmpepl 168 56032 0 53713 131 11 120 128 0 357 18 vmsppl 368 393 0 377 2 0 2 2 0 8 0 pdppl 4096 807 0 760 7 0 7 7 0 8 1 pvpl 32 189850 0 167812 202 4 198 198 0 265 19 pmappl 232 399 0 377 2 0 2 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 507 0 6 15 0 15 15 0 8 0