panic: pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd80682e1a00+16 0x0!=0x7be74668be8ad9d3 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 72718 86966 0 0x2 0x4000000 0 syz-fuzzer *449484 48955 0 0x12 0 1 sshd 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(ffffffff8264e7f0) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8264e7f0) 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(fffffd806d5e7b00,1080,580,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd806d5e7b00,1080,580,2) at m_copym+0x174 sys/kern/uipc_mbuf.c:667 tcp_output(ffff800000a7a660) at tcp_output+0x151c sys/netinet/tcp_output.c:673 tcp_usrreq(fffffd806e97d908,9,fffffd806d5e7b00,0,0,ffff800020ac1b38) at tcp_usrreq+0xa45 sosend(fffffd806e97d908,0,ffff800020aeb1e8,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ac1b38,4,ffff800020aeb1e8,0,ffff800020aeb2d0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb280,ffff800020aeb2d0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb350) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb350) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,4,d57ef71616b,4,4,d5a522c4700) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff4330, count: 3 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 0xfffffd80682e1a00+16 0x0!=0x7be74668be8ad9d3 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(ffffffff8264e7f0) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff8264e7f0) 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(fffffd806d5e7b00,1080,580,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd806d5e7b00,1080,580,2) at m_copym+0x174 sys/kern/uipc_mbuf.c:667 tcp_output(ffff800000a7a660) at tcp_output+0x151c sys/netinet/tcp_output.c:673 tcp_usrreq(fffffd806e97d908,9,fffffd806d5e7b00,0,0,ffff800020ac1b38) at tcp_usrreq+0xa45 sosend(fffffd806e97d908,0,ffff800020aeb1e8,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ac1b38,4,ffff800020aeb1e8,0,ffff800020aeb2d0) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb280,ffff800020aeb2d0) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb350) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb350) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(6,4,d57ef71616b,4,4,d5a522c4700) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff4330, count: -12 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020aeab90 rbx 0xffff800020aeac40 rdx 0xffff800020ac1b38 rcx 0 rax 0 r8 0xffffffff8182804f kprintf+0x16f r9 0x1 r10 0x25 r11 0xf0cda0a060eee5ea r12 0x3000000008 r13 0xffff800020aeaba0 r14 0x100 r15 0x1 rip 0xffffffff81d20338 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020aeab80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=449484 stat=onproc flags process=12 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac09f0,0xffff800020ac0ef0 process=0xffff800020a8b510 user=0xffff800020ae6000, vmspace=0xfffffd806e7dc2e8 estcpu=0, cpticks=1, pctcpu=0.8 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 39667 287165 0 0 3 0x14200 bored sosplice 30973 90307 86966 0 3 0x82 piperd syz-executor.1 51874 1669 86966 0 3 0x2 biowait syz-executor.0 86966 491386 66660 0 3 0x82 thrsleep syz-fuzzer 86966 26754 66660 0 3 0x4000082 nanosleep syz-fuzzer 86966 3750 66660 0 3 0x4000082 thrsleep syz-fuzzer 86966 301050 66660 0 3 0x4000082 thrsleep syz-fuzzer 86966 32592 66660 0 3 0x4000082 nanosleep syz-fuzzer 86966 215524 66660 0 3 0x4000082 thrsleep syz-fuzzer 86966 425277 66660 0 3 0x4000082 kqread syz-fuzzer 86966 208624 66660 0 3 0x4000082 thrsleep syz-fuzzer 86966 72718 66660 0 7 0x4000002 syz-fuzzer 86966 441366 66660 0 3 0x4000082 thrsleep syz-fuzzer 66660 124540 48955 0 3 0x10008a pause ksh *48955 449484 64811 0 7 0x12 sshd 20627 405989 1 0 3 0x100083 ttyin getty 64811 488839 1 0 3 0x80 select sshd 42583 502547 24123 74 3 0x100092 bpf pflogd 24123 95907 1 0 3 0x80 netio pflogd 10260 91153 53374 73 3 0x100090 kqread syslogd 53374 82086 1 0 3 0x100082 netio syslogd 35355 505256 1 77 3 0x100090 poll dhclient 91182 436098 1 0 3 0x80 poll dhclient 79000 42032 0 0 3 0x14200 pgzero zerothread 9837 172179 0 0 3 0x14200 aiodoned aiodoned 80862 475503 0 0 3 0x14200 syncer update 97842 74677 0 0 3 0x14200 cleaner cleaner 36597 366720 0 0 3 0x14200 reaper reaper 69374 4882 0 0 3 0x14200 pgdaemon pagedaemon 53567 113573 0 0 3 0x14200 bored crynlk 63527 481596 0 0 3 0x14200 bored crypto 53332 325030 0 0 3 0x40014200 acpi0 acpi0 14413 31586 0 0 3 0x40014200 idle1 40076 147353 0 0 3 0x14200 bored softnet 27640 462005 0 0 3 0x14200 bored systqmp 21486 96860 0 0 3 0x14200 bored systq 89822 182505 0 0 3 0x40014200 bored softclock 22941 427149 0 0 3 0x40014200 idle0 34896 13429 0 0 3 0x14200 bored smr 1 244279 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks CPU 0: exclusive sched_lock &sched_lock r = 0 (0xffffffff82651580) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 sleep_setup+0xba sys/kern/kern_synch.c:351 #2 msleep+0x96 sleep_setup_timeout sys/kern/kern_synch.c:390 [inline] #2 msleep+0x96 sys/kern/kern_synch.c:235 #3 taskq_next_work+0xba sys/kern/kern_task.c:322 #4 taskq_thread+0xe5 sys/kern/kern_task.c:365 #5 proc_trampoline+0x1c exclusive mutex softnet r = 0 (0xffff8000000230b0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 taskq_next_work+0x38 sys/kern/kern_task.c:312 #4 taskq_thread+0xe5 sys/kern/kern_task.c:365 #5 proc_trampoline+0x1c Process 51874 (syz-executor.0) thread 0xffff800020ab1160 (1669) exclusive rrwlock inode r = 0 (0xfffffd806ac78e68) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:574 #5 vget+0x1c3 sys/kern/vfs_subr.c:672 #6 ufs_ihashget+0x141 sys/ufs/ufs/ufs_ihash.c:119 #7 ffs_vget+0x74 sys/ufs/ffs/ffs_vfsops.c:1323 #8 ufs_lookup+0x14b4 sys/ufs/ufs/ufs_lookup.c:487 #9 VOP_LOOKUP+0x5b sys/kern/vfs_vops.c:91 #10 vfs_lookup+0x7a6 sys/kern/vfs_lookup.c:568 #11 namei+0x63c sys/kern/vfs_lookup.c:249 #12 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #13 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #13 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #14 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd806ac783c8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 rw_enter+0x447 sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0xf0 sys/kern/vfs_vops.c:615 #4 vn_lock+0x81 sys/kern/vfs_vnops.c:574 #5 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:419 #6 namei+0x63c sys/kern/vfs_lookup.c:249 #7 dounlinkat+0x99 sys/kern/vfs_syscalls.c:1785 #8 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #8 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #9 Xsyscall+0x128 Process 48955 (sshd) thread 0xffff800020ac1b38 (449484) exclusive rwlock netlock r = 0 (0xffffffff82505ce8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1163 #1 solock+0x5a sys/kern/uipc_socket2.c:282 #2 sosend+0x51b sys/kern/uipc_socket.c:512 #3 dofilewritev+0x1b7 sys/kern/sys_generic.c:364 #4 sys_write+0x83 sys/kern/sys_generic.c:284 #5 syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] #5 syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 #6 Xsyscall+0x128 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9481 6393K 6778K 78643K 12056 0 0 pcb 13 8K 8K 78643K 41 0 0 rtable 91 4K 4K 78643K 275 0 0 ifaddr 44 11K 11K 78643K 180 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1478 0 0 iov 0 0K 16K 78643K 30 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1219 77K 77K 78643K 1332 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 4 0 0 VM map 2 1K 1K 78643K 4 0 0 sem 12 0K 0K 78643K 800 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 4 9K 25K 78643K 1329 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 60 63K 95K 78643K 439 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 2K 78643K 630 0 0 in_multi 22 1K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 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 216 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 96 21K 22K 78643K 6927 0 0 UVM aobj 6 2K 2K 78643K 6 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 34 0 0 NDP 8 0K 0K 78643K 17 0 0 temp 144 3555K 3624K 78643K 6434 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 8 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 21 0 19 1 0 1 1 0 8 0 rtentry 112 51 0 17 2 0 2 2 0 8 0 unpcb 120 2372 0 2362 1 0 1 1 0 8 0 syncache 264 6 0 6 2 2 0 1 0 8 0 tcpqe 32 6195 0 6195 2 2 0 2 0 8 0 tcpcb 544 1196 0 1192 1 0 1 1 0 8 0 inpcb 280 3439 0 3432 4 2 2 3 0 8 1 nd6 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 4 0 4 2 2 0 1 0 8 0 pffrag 232 5 0 5 2 2 0 1 0 482 0 pffrnode 88 5 0 5 2 2 0 1 0 8 0 pffrent 40 139 0 139 2 2 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 23 0 14 1 0 1 1 0 8 0 pfstkey 112 23 0 14 1 0 1 1 0 8 0 pfstate 328 23 0 14 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 226 0 57 14 1 13 14 0 8 0 art_table 32 227 0 57 2 0 2 2 0 8 0 art_node 16 50 0 19 1 0 1 1 0 8 0 sysvmsgpl 40 98 0 58 1 0 1 1 0 8 0 semapl 112 798 0 788 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2773 0 1368 46 0 46 46 0 8 0 ffsino 272 2773 0 1368 94 0 94 94 0 8 0 nchpl 144 5196 0 3578 61 0 61 61 0 8 0 uvmvnodes 72 2912 0 0 53 0 53 53 0 8 0 vnodes 208 2912 0 0 154 0 154 154 0 8 0 namei 1024 15041 0 15041 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 vmpool 552 2 0 2 1 1 0 1 0 8 0 scxspl 192 12883 0 12882 10 9 1 6 0 8 0 plimitpl 152 21 0 13 1 0 1 1 0 8 0 sigapl 432 1529 0 1515 3 1 2 3 0 8 0 futexpl 56 46754 0 46754 1 0 1 1 0 8 1 knotepl 112 69 0 50 1 0 1 1 0 8 0 kqueuepl 104 409 0 407 1 0 1 1 0 8 0 pipepl 112 4748 0 4729 3 2 1 2 0 8 0 fdescpl 488 1530 0 1515 3 0 3 3 0 8 0 filepl 152 17440 0 17340 10 4 6 6 0 8 2 lockfpl 104 59 0 58 1 0 1 1 0 8 0 lockfspl 48 18 0 17 1 0 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 1300 0 1291 1 0 1 1 0 8 0 zombiepl 144 1515 0 1515 3 2 1 1 0 8 1 processpl 896 1546 0 1515 4 0 4 4 0 8 0 procpl 632 6175 0 6135 6 1 5 6 0 8 1 srpgc 64 2 0 2 1 1 0 1 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 5832 0 5813 12 7 5 6 0 8 3 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 18 0 0 3 0 3 3 0 8 0 mcl4k 4096 11 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 235 0 0 29 1 28 29 0 8 1 mtagpl 80 15 0 0 1 0 1 1 0 8 0 mbufpl 256 354 0 0 16 0 16 16 0 8 0 bufpl 256 7711 0 1315 400 0 400 400 0 8 0 anonpl 16 131804 0 114695 73 2 71 71 0 124 0 amapchunkpl 152 11482 0 11370 8 1 7 7 0 158 0 amappl16 192 6274 0 5321 50 1 49 49 0 8 0 amappl14 176 952 0 948 2 1 1 1 0 8 0 amappl13 168 9 0 7 1 0 1 1 0 8 0 amappl12 160 2 0 2 1 1 0 1 0 8 0 amappl11 152 50 0 35 1 0 1 1 0 8 0 amappl10 144 14 0 9 1 0 1 1 0 8 0 amappl9 136 995 0 986 1 0 1 1 0 8 0 amappl8 128 541 0 518 1 0 1 1 0 8 0 amappl7 120 40 0 36 1 0 1 1 0 8 0 amappl6 112 74 0 64 1 0 1 1 0 8 0 amappl5 104 130 0 116 1 0 1 1 0 8 0 amappl4 96 884 0 853 1 0 1 1 0 8 0 amappl3 88 2329 0 2321 1 0 1 1 0 8 0 amappl2 80 11960 0 11898 4 2 2 3 0 8 0 amappl1 72 43948 0 43530 25 15 10 20 0 8 0 amappl 80 6417 0 6379 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1532 0 1515 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1532 0 1515 1 0 1 1 0 8 0 vmmpekpl 168 29419 0 29385 3 1 2 3 0 8 0 vmmpepl 168 195880 0 193905 147 48 99 114 0 357 2 vmsppl 368 1529 0 1515 2 0 2 2 0 8 0 pdppl 4096 3071 0 3034 7 1 6 6 0 8 1 pvpl 32 429613 0 409402 197 29 168 173 0 265 2 pmappl 232 1531 0 1517 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 581 0 8 17 0 17 17 0 8 0