panic: pr_find_pagehead: mbufpl: incorrect page Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821cef41) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b34a8,fffffd8058000000) at pool_do_put+0x36a pool_put(ffffffff825b34a8,fffffd8058000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8058000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e40ea48) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e40ea48) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009fba78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d01,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001e40eb70) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd80632e35b0,7,fffffd806c3bfa20,ffff80001d35e128) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80566e8d30,ffff80001d35e128) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80566e8d30,ffff80001d35e128) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80566e8d30,ffff80001d35e128) at fdrop+0xc2 sys/kern/kern_descrip.c:1274 closef(fffffd80566e8d30,ffff80001d35e128) at closef+0x117 sys/kern/kern_descrip.c:1258 fdfree(ffff80001d35e128) at fdfree+0x100 sys/kern/kern_descrip.c:1190 end trace frame: 0xffff80001e40edc0, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic pr_find_pagehead: mbufpl: incorrect page ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821cef41) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825b34a8,fffffd8058000000) at pool_do_put+0x36a pool_put(ffffffff825b34a8,fffffd8058000000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd8058000000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e40ea48) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e40ea48) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff8000009fba78) at ifq_purge+0x97 sys/net/ifq.c:462 tun_dev_close(5d01,7) at tun_dev_close+0xc8 sys/net/if_tun.c:460 spec_close(ffff80001e40eb70) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd80632e35b0,7,fffffd806c3bfa20,ffff80001d35e128) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd80566e8d30,ffff80001d35e128) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd80566e8d30,ffff80001d35e128) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd80566e8d30,ffff80001d35e128) at fdrop+0xc2 sys/kern/kern_descrip.c:1274 closef(fffffd80566e8d30,ffff80001d35e128) at closef+0x117 sys/kern/kern_descrip.c:1258 fdfree(ffff80001d35e128) at fdfree+0x100 sys/kern/kern_descrip.c:1190 exit1(ffff80001d35e128,0,0,1) at exit1+0x334 sys/kern/kern_exit.c:196 sys_exit(ffff80001d35e128,ffff80001e40ee00,ffff80001e40ee50) at sys_exit+0x16 sys/kern/kern_exit.c:94 syscall(ffff80001e40eed0) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdbc70, count: -18 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e40e7f0 rbx 0xffff80001e40e8a0 rdx 0x2 rcx 0 rax 0 r8 0xffff80001e40e7b0 r9 0x1 r10 0 r11 0x1c2fc86617e8cd09 r12 0x3000000008 r13 0xffff80001e40e800 r14 0x100 r15 0x1 rip 0xffffffff8176b428 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e40e7e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=225383 stat=onproc flags process=1018 proc=2000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff80001d35d018,0xffffffff825b4710 process=0xffff8000ffffa710 user=0xffff80001e409000, vmspace=0xfffffd8056b3d558 estcpu=36, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 65113 328108 1 0 3 0x100083 ttyin getty 18344 454062 98004 0 2 0x2 syz-executor.0 78160 464562 0 0 3 0x14200 acct acct 47218 33277 0 0 3 0x14200 bored sosplice 98004 118134 98962 0 3 0x82 thrsleep syz-fuzzer 98004 516315 98962 0 2 0x4000482 syz-fuzzer 98004 336945 98962 0 3 0x4000082 thrsleep syz-fuzzer 98004 282297 98962 0 3 0x4000082 thrsleep syz-fuzzer 98004 459917 98962 0 3 0x4000082 thrsleep syz-fuzzer 98004 416780 98962 0 3 0x4000082 thrsleep syz-fuzzer 98004 293177 98962 0 3 0x4000082 thrsleep syz-fuzzer 98004 394043 98962 0 2 0x4000082 syz-fuzzer 98962 51896 97170 0 3 0x10008a pause ksh 97170 414784 29031 0 3 0x92 select sshd 29031 394537 1 0 3 0x80 select sshd 71561 391541 90414 73 3 0x100090 kqread syslogd 90414 33313 1 0 3 0x100082 netio syslogd 12152 176506 1 77 3 0x100090 poll dhclient 24653 432645 1 0 3 0x80 poll dhclient 67533 157016 0 0 3 0x14200 bored smr 15339 185419 0 0 2 0x14200 zerothread 55944 313931 0 0 3 0x14200 aiodoned aiodoned 75672 141260 0 0 3 0x14200 syncer update 5452 397072 0 0 3 0x14200 cleaner cleaner 60070 410521 0 0 3 0x14200 reaper reaper 14645 373514 0 0 3 0x14200 pgdaemon pagedaemon 72574 486341 0 0 3 0x14200 bored crynlk 49123 107586 0 0 3 0x14200 bored crypto 4098 300186 0 0 3 0x40014200 acpi0 acpi0 43606 268446 0 0 3 0x14200 bored softnet 74256 120516 0 0 3 0x14200 bored systqmp 7516 5754 0 0 3 0x14200 bored systq 95932 441978 0 0 2 0x40014200 softclock 83709 500427 0 0 3 0x40014200 idle0 1 191417 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9537 6372K 7280K 78643K 11904 0 pcb 13 8K 8K 78643K 205 0 rtable 118 4K 4K 78643K 484 0 ifaddr 109 21K 21K 78643K 272 0 counters 21 16K 16K 78643K 47 0 ioctlops 0 0K 2K 78643K 83 0 iov 0 0K 32K 78643K 160 0 mount 1 1K 1K 78643K 1 0 vnodes 1226 77K 77K 78643K 1646 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 15 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 159 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 4 9K 25K 78643K 707 0 sigio 0 0K 0K 78643K 100 0 proc 52 38K 63K 78643K 508 0 subproc 23 1K 2K 78643K 53 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 85 0 in_multi 115 5K 5K 78643K 214 0 ether_multi 1 0K 0K 78643K 32 0 mrt 0 0K 0K 78643K 10 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 73 334K 334K 78643K 73 0 exec 0 0K 1K 78643K 292 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 116 95K 119K 78643K 2543 0 UVM aobj 40 4K 4K 78643K 45 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 217 0 NDP 16 0K 0K 78643K 49 0 temp 145 3018K 3094K 78643K 30673 0 kqueue 3 4K 12K 78643K 64 0 SYN cache 2 16K 16K 78643K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 14 0 4 1 0 1 1 0 8 0 rtpcb 80 71 0 69 1 0 1 1 0 8 0 rtentry 112 75 0 26 2 0 2 2 0 8 0 unpcb 120 353 0 345 1 0 1 1 0 8 0 syncache 264 10 0 10 3 2 1 1 0 8 1 tcpqe 32 265 0 265 2 2 0 1 0 8 0 tcpcb 544 395 0 390 3 1 2 2 0 8 1 ipq 40 11 0 11 4 3 1 1 0 8 1 ipqe 40 242 0 242 4 3 1 1 0 8 1 inpcb 280 2211 0 2198 6 3 3 4 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 ip6q 72 1 0 0 1 0 1 1 0 8 0 nd6 48 12 0 7 1 0 1 1 0 8 0 pkpcb 40 8 0 8 2 1 1 1 0 8 1 ppxss 1128 4 0 4 1 1 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 319 0 98 15 1 14 14 0 8 0 art_table 32 321 0 98 2 0 2 2 0 8 0 art_node 16 74 0 28 1 0 1 1 0 8 0 sysvmsgpl 40 28 0 16 1 0 1 1 0 8 0 semapl 112 157 0 147 1 0 1 1 0 8 0 shmpl 112 43 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2471 0 1068 46 0 46 46 0 8 0 ffsino 240 2471 0 1068 83 0 83 83 0 8 0 nchpl 144 3676 0 2081 60 0 60 60 0 8 0 uvmvnodes 72 2793 0 0 51 0 51 51 0 8 0 vnodes 208 2793 0 0 147 0 147 147 0 8 0 namei 1024 10839 0 10838 1 0 1 1 0 8 0 vcpupl 1984 11 0 1 2 0 2 2 0 8 0 vmpool 528 17 0 7 1 0 1 1 0 8 0 scxspl 192 12266 0 12266 1 0 1 1 0 8 1 plimitpl 152 68 0 61 1 0 1 1 0 8 0 sigapl 424 894 0 865 4 0 4 4 0 8 0 futexpl 56 21003 0 21003 1 0 1 1 0 8 1 knotepl 112 138 0 119 1 0 1 1 0 8 0 kqueuepl 144 206 0 204 1 0 1 1 0 8 0 pipelkpl 16 279 0 269 1 0 1 1 0 8 0 pipepl 120 558 0 542 1 0 1 1 0 8 0 fdescpl 432 877 0 864 2 0 2 2 0 8 0 filepl 120 7238 0 7155 8 4 4 6 0 8 0 lockfpl 104 222 0 221 1 0 1 1 0 8 0 lockfspl 48 79 0 78 1 0 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 25 0 15 1 0 1 1 0 8 0 ucredpl 96 771 0 763 1 0 1 1 0 8 0 zombiepl 144 866 0 864 1 0 1 1 0 8 0 processpl 896 894 0 864 4 0 4 4 0 8 0 procpl 624 1752 0 1715 4 0 4 4 0 8 0 sosppl 128 10 0 10 2 2 0 1 0 8 0 sockpl 400 2672 0 2653 10 6 4 7 0 8 1 mcl64k 65536 106 0 106 1 0 1 1 0 8 1 mcl16k 16384 10 0 10 3 2 1 1 0 8 1 mcl12k 12288 26 0 26 1 0 1 1 0 8 1 mcl9k 9216 13 0 13 2 1 1 1 0 8 1 mcl8k 8192 37 0 37 1 0 1 1 0 8 1 mcl4k 4096 93 0 93 2 1 1 1 0 8 1 mcl2k2 2112 10 0 10 2 1 1 1 0 8 1 mcl2k 2048 65874 0 65814 21 12 9 16 0 8 0 mtagpl 80 68 0 21 3 1 2 2 0 8 0 mbufpl 256 111128 0 110921 43 15 28 28 0 8 13 bufpl 280 6345 0 961 385 0 385 385 0 8 0 anonpl 16 95032 0 78173 79 8 71 74 0 107 0 amapchunkpl 152 4713 0 4574 30 10 20 20 0 158 12 amappl16 192 4375 0 3427 62 13 49 60 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 489 0 487 2 1 1 1 0 8 0 amappl13 168 30 0 28 1 0 1 1 0 8 0 amappl12 160 175 0 174 1 0 1 1 0 8 0 amappl11 152 74 0 62 1 0 1 1 0 8 0 amappl10 144 18 0 14 1 0 1 1 0 8 0 amappl9 136 383 0 380 1 0 1 1 0 8 0 amappl8 128 305 0 281 1 0 1 1 0 8 0 amappl7 120 114 0 102 1 0 1 1 0 8 0 amappl6 112 27 0 21 1 0 1 1 0 8 0 amappl5 104 823 0 811 1 0 1 1 0 8 0 amappl4 96 634 0 597 1 0 1 1 0 8 0 amappl3 88 289 0 283 1 0 1 1 0 8 0 amappl2 80 6167 0 6103 3 1 2 3 0 8 0 amappl1 72 25592 0 25181 26 17 9 20 0 8 0 amappl 80 2011 0 1965 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 18 0 17 1 0 1 1 0 8 0 aobjpl 64 44 0 5 1 0 1 1 0 8 0 uaddrrnd 24 894 0 871 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 894 0 871 1 0 1 1 0 8 0 vmmpekpl 168 9565 0 9533 2 0 2 2 0 8 0 vmmpepl 168 109592 0 107612 145 36 109 124 0 357 15 vmsppl 272 893 0 871 2 0 2 2 0 8 0 pdppl 4096 1794 0 1752 7 1 6 6 0 8 0 pvpl 32 277712 0 258190 184 17 167 177 0 265 0 pmappl 200 893 0 871 2 0 2 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 203 0 41 5 0 5 5 0 8 0