panic: pool_cache_item_magic_check: mbufpl cpu free list modified: item addr 0xfffffd806d485700+16 0x0!=0xdd9ad3dbcca73839 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 132063 81042 0 0x2 0 0 syz-executor.0 *278272 11597 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(ffffffff82664228) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff82664228) 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(fffffd8062984800,0,45c,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd8062984800,0,45c,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(fffffd806e985608,9,fffffd8062984800,0,0,ffff800020ac1b38) at tcp_usrreq+0xa45 sosend(fffffd806e985608,0,ffff800020aeb298,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ac1b38,4,ffff800020aeb298,0,ffff800020aeb380) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb330,ffff800020aeb380) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb400) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb400) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,4,f97cfa1616b,4,4,f9a664d7b80) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd6730, 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 0xfffffd806d485700+16 0x0!=0xdd9ad3dbcca73839 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(ffffffff82664228) at pool_cache_get+0x323 pool_cache_item_magic_check sys/kern/subr_pool.c:1789 [inline] pool_cache_get(ffffffff82664228) 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(fffffd8062984800,0,45c,2) at m_copym+0x174 m_get sys/kern/uipc_mbuf.c:250 [inline] m_copym(fffffd8062984800,0,45c,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(fffffd806e985608,9,fffffd8062984800,0,0,ffff800020ac1b38) at tcp_usrreq+0xa45 sosend(fffffd806e985608,0,ffff800020aeb298,0,0,80) at sosend+0x645 sys/kern/uipc_socket.c:524 dofilewritev(ffff800020ac1b38,4,ffff800020aeb298,0,ffff800020aeb380) at dofilewritev+0x1b7 sys/kern/sys_generic.c:364 sys_write(ffff800020ac1b38,ffff800020aeb330,ffff800020aeb380) at sys_write+0x83 sys/kern/sys_generic.c:284 syscall(ffff800020aeb400) at syscall+0x4a4 mi_syscall sys/sys/syscall_mi.h:92 [inline] syscall(ffff800020aeb400) at syscall+0x4a4 sys/arch/amd64/amd64/trap.c:555 Xsyscall(0,4,f97cfa1616b,4,4,f9a664d7b80) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd6730, count: -12 ddb{1}> show registers rdi 0 rsi 0x1 rbp 0xffff800020aeac40 rbx 0xffff800020aeacf0 rdx 0xffff800020ac1b38 rcx 0 rax 0 r8 0xffffffff81186cff kprintf+0x16f r9 0x1 r10 0x25 r11 0x4e7fbd0b6f1c8d77 r12 0x3000000008 r13 0xffff800020aeac50 r14 0x100 r15 0x1 rip 0xffffffff819807c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020aeac30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (sshd) pid=278272 stat=onproc flags process=12 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020ac0288,0xffff800020ac0c78 process=0xffff800020a8b890 user=0xffff800020ae6000, vmspace=0xfffffd806e7e5178 estcpu=1, cpticks=3, pctcpu=0.11 user=0, sys=2, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 69606 380697 7532 0 2 0 syz-executor.1 69606 74575 7532 0 3 0x4000080 poll syz-executor.1 21587 81438 0 0 3 0x14200 acct acct 81042 132063 95496 0 7 0x2 syz-executor.0 7532 57829 95496 0 3 0x82 nanosleep syz-executor.1 60872 213195 0 0 3 0x14200 bored sosplice 95496 397888 14584 0 3 0x82 nanosleep syz-fuzzer 95496 289586 14584 0 3 0x4000082 nanosleep syz-fuzzer 95496 424501 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 362020 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 304397 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 187237 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 228414 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 359388 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 17423 14584 0 3 0x4000082 thrsleep syz-fuzzer 95496 498996 14584 0 3 0x4000082 kqread syz-fuzzer 14584 214104 11597 0 3 0x10008a pause ksh *11597 278272 2654 0 7 0x12 sshd 9217 455123 1 0 3 0x100083 ttyin getty 2654 435986 1 0 3 0x80 select sshd 13923 327532 62467 74 3 0x100092 bpf pflogd 62467 353766 1 0 3 0x80 netio pflogd 98421 13893 71617 73 3 0x100090 kqread syslogd 71617 343567 1 0 3 0x100082 netio syslogd 6868 160752 1 77 3 0x100090 poll dhclient 8259 415889 1 0 3 0x80 poll dhclient 47078 252184 0 0 3 0x14200 pgzero zerothread 29109 263243 0 0 3 0x14200 aiodoned aiodoned 77835 95090 0 0 3 0x14200 syncer update 45173 102130 0 0 3 0x14200 cleaner cleaner 89422 315317 0 0 3 0x14200 reaper reaper 92166 60485 0 0 3 0x14200 pgdaemon pagedaemon 50983 240179 0 0 3 0x14200 bored crynlk 44788 289239 0 0 3 0x14200 bored crypto 17875 34558 0 0 3 0x40014200 acpi0 acpi0 19438 195669 0 0 3 0x40014200 idle1 18483 124062 0 0 3 0x14200 bored softnet 35746 93741 0 0 3 0x14200 bored systqmp 60092 16677 0 0 3 0x14200 bored systq 44289 411673 0 0 3 0x40014200 bored softclock 81260 95765 0 0 3 0x40014200 idle0 83928 188299 0 0 3 0x14200 bored smr 1 166658 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 81042 (syz-executor.0) thread 0xffff800020ab09f8 (132063) exclusive rrwlock inode r = 0 (0xfffffd807bdaee70) #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:562 #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 (0xfffffd806e1fe6f8) #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:562 #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 11597 (sshd) thread 0xffff800020ac1b38 (278272) exclusive rwlock netlock r = 0 (0xffffffff824b31d8) #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 9541 6436K 6924K 78643K 11941 0 0 pcb 13 10K 12K 78643K 164 0 0 rtable 90 3K 4K 78643K 602 0 0 ifaddr 63 13K 14K 78643K 187 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1496 0 0 iov 0 0K 16K 78643K 140 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 77K 78643K 1762 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 3 5K 5K 78643K 8 0 0 VM map 2 1K 1K 78643K 4 0 0 sem 12 0K 0K 78643K 174 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12765 0 0 file desc 5 13K 25K 78643K 675 0 0 sigio 0 0K 0K 78643K 13 0 0 proc 60 63K 95K 78643K 615 0 0 subproc 32 2K 2K 78643K 85 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 52 0 0 in_multi 22 1K 2K 78643K 97 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 10 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 307 0 0 pfkey data 0 0K 0K 78643K 2 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 100 21K 22K 78643K 3250 0 0 UVM aobj 29 2K 2K 78643K 31 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 98 0 0 NDP 14 0K 0K 78643K 54 0 0 temp 188 3560K 3643K 78643K 27660 0 0 kqueue 0 0K 0K 78643K 3 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 18 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 80 65 0 63 1 0 1 1 0 8 0 rtentry 112 107 0 72 2 0 2 2 0 8 0 unpcb 120 318 0 308 1 0 1 1 0 8 0 syncache 264 11 0 11 5 4 1 1 0 8 1 tcpqe 32 5769 0 5769 3 3 0 2 0 8 0 tcpcb 544 595 0 591 14 5 9 12 0 8 8 inpcb 280 1089 0 1082 13 4 9 9 0 8 8 rttmr 72 5 0 4 1 0 1 1 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 nd6 48 13 0 10 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 0 1 1 0 8 1 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 21 0 21 2 1 1 1 0 8 1 pffrag 232 13 0 13 3 2 1 1 0 482 1 pffrnode 88 13 0 13 3 2 1 1 0 8 1 pffrent 40 158 0 158 3 2 1 1 0 8 1 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 57 0 13 1 0 1 1 0 8 0 pfstkey 112 57 0 13 2 0 2 2 0 8 0 pfstate 328 57 0 13 4 0 4 4 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 519 0 303 18 4 14 15 0 8 0 art_table 32 520 0 303 2 0 2 2 0 8 0 art_node 16 106 0 74 1 0 1 1 0 8 0 sysvmsgpl 40 33 0 33 1 1 0 1 0 8 0 semapl 112 172 0 162 1 0 1 1 0 8 0 shmpl 112 29 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2446 0 1043 46 0 46 46 0 8 0 ffsino 272 2446 0 1043 94 0 94 94 0 8 0 nchpl 144 3959 0 2353 61 0 61 61 0 8 0 uvmvnodes 72 2849 0 0 52 0 52 52 0 8 0 vnodes 208 2849 0 0 150 0 150 150 0 8 0 namei 1024 11729 0 11729 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 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 11011 0 11011 13 12 1 7 0 8 1 plimitpl 152 85 0 77 1 0 1 1 0 8 0 sigapl 432 866 0 851 3 1 2 3 0 8 0 futexpl 56 15003 0 15003 1 0 1 1 0 8 1 knotepl 112 165 0 146 1 0 1 1 0 8 0 kqueuepl 104 288 0 286 4 0 4 4 0 8 3 pipepl 112 548 0 529 3 1 2 2 0 8 1 fdescpl 488 867 0 851 3 0 3 3 0 8 0 filepl 152 6993 0 6893 17 5 12 14 0 8 8 lockfpl 104 228 0 227 1 0 1 1 0 8 0 lockfspl 48 81 0 80 1 0 1 1 0 8 0 sessionpl 112 21 0 10 1 0 1 1 0 8 0 pgrppl 48 53 0 42 1 0 1 1 0 8 0 ucredpl 96 798 0 789 1 0 1 1 0 8 0 zombiepl 144 851 0 851 3 2 1 1 0 8 1 processpl 896 884 0 851 4 0 4 4 0 8 0 procpl 632 2348 0 2305 5 0 5 5 0 8 1 srpgc 64 4 0 4 2 2 0 1 0 8 0 sosppl 128 19 0 19 3 2 1 1 0 8 1 sockpl 384 1481 0 1462 18 8 10 14 0 8 8 mcl64k 65536 13 0 0 2 0 2 2 0 8 0 mcl16k 16384 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 12 0 0 2 0 2 2 0 8 0 mcl9k 9216 10 0 0 1 0 1 1 0 8 0 mcl8k 8192 8 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 246 0 0 29 0 29 29 0 8 0 mtagpl 80 11 0 0 1 0 1 1 0 8 0 mbufpl 256 345 0 0 19 0 19 19 0 8 0 mbufpl: pool(0xffffffff82664228:mbufpl): free list modified: page 0xfffffd8067b53000; item ordinal 2; addr 0xfffffd8067b53300 (p 0xfffffd8067b56000); offset 0x0=0x0 pool(mbufpl): free list modified: page 0xfffffd8067b53000; item ordinal 2; addr 0xfffffd8067b53300 (p 0xfffffd8067b56000); offset 0x0=0x0 mbufpl: pool(0xffffffff82664228:mbufpl): page inconsistency: page 0xfffffd8067b53000; item ordinal 3; addr 0xf903d06ee0a7eabc bufpl 256 8276 0 1323 435 0 435 435 0 8 0 anonpl 16 98036 0 81066 89 18 71 85 0 124 2 amapchunkpl 152 5146 0 5039 14 9 5 10 0 158 0 amappl16 192 4074 0 3122 62 12 50 60 0 8 2 amappl15 184 222 0 222 1 1 0 1 0 8 0 amappl14 176 163 0 161 2 1 1 1 0 8 0 amappl13 168 66 0 66 1 1 0 1 0 8 0 amappl12 160 6 0 5 1 0 1 1 0 8 0 amappl11 152 260 0 241 1 0 1 1 0 8 0 amappl10 144 21 0 14 1 0 1 1 0 8 0 amappl9 136 658 0 652 1 0 1 1 0 8 0 amappl8 128 202 0 178 1 0 1 1 0 8 0 amappl7 120 62 0 54 1 0 1 1 0 8 0 amappl6 112 265 0 252 1 0 1 1 0 8 0 amappl5 104 166 0 151 1 0 1 1 0 8 0 amappl4 96 1127 0 1095 1 0 1 1 0 8 0 amappl3 88 139 0 134 1 0 1 1 0 8 0 amappl2 80 6136 0 6065 4 2 2 3 0 8 0 amappl1 72 28998 0 28562 26 16 10 20 0 8 0 amappl 80 2643 0 2606 1 0 1 1 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 30 0 2 1 0 1 1 0 8 0 uaddrrnd 24 869 0 851 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 869 0 851 1 0 1 1 0 8 0 vmmpekpl 168 10532 0 10496 2 0 2 2 0 8 0 vmmpepl 168 114269 0 112192 167 45 122 128 0 357 27 vmsppl 368 866 0 851 2 0 2 2 0 8 0 pdppl 4096 1745 0 1706 7 1 6 6 0 8 1 pvpl 32 296521 0 276391 215 33 182 200 0 265 17 pmappl 232 868 0 853 3 2 1 2 0 8 0 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 636 0 15 18 0 18 18 0 8 0