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(ffffffff821e1d1f) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bbd50,fffffd806b550000) at pool_do_put+0x36a pool_put(ffffffff825bbd50,fffffd806b550000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b550000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e818ba8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e818ba8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a1d278) 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(ffff80001e818cd0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d7fc8f0,7,fffffd806c3bf960,ffff80001d7514f8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd805804ab50,ffff80001d7514f8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd805804ab50,ffff80001d7514f8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d7514f8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 end trace frame: 0xffff80001e818f20, 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(ffffffff821e1d1f) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bbd50,fffffd806b550000) at pool_do_put+0x36a pool_put(ffffffff825bbd50,fffffd806b550000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b550000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e818ba8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e818ba8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a1d278) 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(ffff80001e818cd0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d7fc8f0,7,fffffd806c3bf960,ffff80001d7514f8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd805804ab50,ffff80001d7514f8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd805804ab50,ffff80001d7514f8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d7514f8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d7514f8,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d7514f8,ffff80001e818f60,ffff80001e818fb0) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e819030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1070, count: -18 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80001e818950 rbx 0xffff80001e818a00 rdx 0x2 rcx 0 rax 0 r8 0xffff80001e818910 r9 0x1 r10 0 r11 0xb03495b8490f0a68 r12 0x3000000008 r13 0xffff80001e818960 r14 0x100 r15 0x1 rip 0xffffffff81902518 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001e818940 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=433676 stat=onproc flags process=1008 proc=2000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff80001d751018,0xffffffff825bf9c0 process=0xffff8000ffff8e78 user=0xffff80001e814000, vmspace=0xfffffd8058896338 estcpu=30, cpticks=10, pctcpu=0.3 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 33536 346499 1 0 3 0x100083 ttyin getty 99560 86981 65732 0 3 0x82 piperd syz-executor.0 23866 473030 0 0 3 0x14200 bored sosplice 7267 365318 0 0 3 0x14200 acct acct 65732 140214 68004 0 2 0x2 syz-fuzzer 65732 462520 68004 0 3 0x4000082 nanosleep syz-fuzzer 65732 366179 68004 0 3 0x4000082 thrsleep syz-fuzzer 65732 168461 68004 0 3 0x4000082 thrsleep syz-fuzzer 65732 209385 68004 0 3 0x4000082 thrsleep syz-fuzzer 65732 205227 68004 0 3 0x4000082 thrsleep syz-fuzzer 65732 2398 68004 0 3 0x4000082 thrsleep syz-fuzzer 65732 182572 68004 0 3 0x4000082 thrsleep syz-fuzzer 68004 252503 28945 0 3 0x10008a pause ksh 28945 196516 58297 0 2 0x92 sshd 58297 295436 1 0 2 0x80 sshd 41062 489121 29337 73 3 0x100090 kqread syslogd 29337 114569 1 0 3 0x100082 netio syslogd 1607 129627 1 77 2 0x100010 dhclient 271 264085 1 0 2 0x80 dhclient 77191 375133 0 0 3 0x14200 bored smr 56484 326424 0 0 2 0x14200 zerothread 33215 460904 0 0 3 0x14200 aiodoned aiodoned 76975 469892 0 0 3 0x14200 syncer update 64587 108709 0 0 3 0x14200 cleaner cleaner 30953 482262 0 0 3 0x14200 reaper reaper 18832 233903 0 0 3 0x14200 pgdaemon pagedaemon 28433 470678 0 0 3 0x14200 bored crynlk 96228 34812 0 0 3 0x14200 bored crypto 67357 482036 0 0 3 0x40014200 acpi0 acpi0 26711 79256 0 0 3 0x14200 bored softnet 12219 236121 0 0 3 0x14200 bored systqmp 7099 386271 0 0 2 0x14200 systq 24248 28649 0 0 3 0x40014200 bored softclock 4304 69756 0 0 3 0x40014200 idle0 1 221138 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 9524 6361K 6841K 78643K 11572 0 pcb 13 8K 8K 78643K 125 0 rtable 112 4K 4K 78643K 519 0 ifaddr 91 17K 18K 78643K 223 0 counters 21 16K 16K 78643K 41 0 ioctlops 0 0K 2K 78643K 50 0 iov 0 0K 16K 78643K 95 0 mount 1 1K 1K 78643K 1 0 vnodes 1219 77K 77K 78643K 1602 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 10 0 VM map 2 0K 0K 78643K 2 0 sem 12 0K 1K 78643K 70 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1794 195K 288K 78643K 12646 0 file desc 4 9K 25K 78643K 641 0 sigio 0 0K 0K 78643K 8 0 proc 49 38K 55K 78643K 563 0 subproc 23 1K 2K 78643K 87 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 266 0 in_multi 88 4K 4K 78643K 195 0 ether_multi 1 0K 0K 78643K 23 0 mrt 0 0K 0K 78643K 4 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 283 0 pfkey data 0 0K 1K 78643K 2 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 132 72K 76K 78643K 2394 0 UVM aobj 12 2K 3K 78643K 22 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 112 0 NDP 15 0K 0K 78643K 47 0 temp 143 3046K 3111K 78643K 40298 0 kqueue 3 4K 12K 78643K 49 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 7 1 0 1 1 0 8 0 rtpcb 80 59 0 57 1 0 1 1 0 8 0 rtentry 112 93 0 50 2 0 2 2 0 8 0 unpcb 120 221 0 213 1 0 1 1 0 8 0 syncache 264 8 0 8 3 2 1 1 0 8 1 tcpqe 32 16 0 16 1 1 0 1 0 8 0 tcpcb 544 212 0 208 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 3 0 3 1 1 0 1 0 8 0 inpcb 280 1349 0 1342 6 4 2 2 0 8 1 rttmr 72 2 0 2 1 1 0 1 0 8 0 nd6 48 17 0 13 1 0 1 1 0 8 0 pkpcb 40 2 0 2 1 1 0 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 4 0 4 2 1 1 1 0 8 1 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 412 0 220 14 1 13 13 0 8 0 art_table 32 415 0 220 2 0 2 2 0 8 0 art_node 16 92 0 52 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 5 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 68 0 58 1 0 1 1 0 8 0 shmpl 112 20 0 10 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2305 0 906 89 0 89 89 0 8 0 ffsino 240 2305 0 906 83 0 83 83 0 8 0 nchpl 144 3367 0 1791 60 0 60 60 0 8 0 uvmvnodes 72 2614 0 0 48 0 48 48 0 8 0 vnodes 208 2614 0 0 138 0 138 138 0 8 0 namei 1024 9397 0 9397 2 1 1 1 0 8 1 vcpupl 1984 5 0 0 1 0 1 1 0 8 0 vmpool 528 10 0 5 1 0 1 1 0 8 0 scxspl 192 9969 0 9969 4 3 1 1 0 8 1 plimitpl 152 73 0 66 1 0 1 1 0 8 0 sigapl 424 821 0 792 4 0 4 4 0 8 0 futexpl 56 12688 0 12688 2 1 1 1 0 8 1 knotepl 112 164 0 145 1 0 1 1 0 8 0 kqueuepl 144 114 0 111 1 0 1 1 0 8 0 pipelkpl 16 164 0 154 1 0 1 1 0 8 0 pipepl 120 328 0 312 1 0 1 1 0 8 0 fdescpl 432 805 0 792 2 0 2 2 0 8 0 filepl 120 4956 0 4873 6 2 4 5 0 8 1 lockfpl 104 125 0 124 1 0 1 1 0 8 0 lockfspl 48 48 0 47 1 0 1 1 0 8 0 sessionpl 112 21 0 11 1 0 1 1 0 8 0 pgrppl 48 25 0 15 1 0 1 1 0 8 0 ucredpl 96 472 0 464 1 0 1 1 0 8 0 zombiepl 144 793 0 791 2 1 1 1 0 8 0 processpl 920 821 0 791 5 1 4 5 0 8 0 procpl 624 1518 0 1481 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 2 0 1 0 8 0 sockpl 400 1641 0 1624 5 2 3 4 0 8 1 mcl64k 65536 52 0 52 6 5 1 1 0 8 1 mcl12k 12288 17 0 17 3 3 0 1 0 8 0 mcl9k 9216 13 0 13 5 5 0 1 0 8 0 mcl8k 8192 9 0 9 5 5 0 1 0 8 0 mcl4k 4096 57 0 57 6 6 0 1 0 8 0 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 63481 0 63437 17 10 7 12 0 8 1 mtagpl 80 51 0 40 3 2 1 1 0 8 0 mbufpl 256 104914 0 104838 18 7 11 11 0 8 1 bufpl 280 4957 0 126 346 0 346 346 0 8 0 anonpl 16 94497 0 81027 80 25 55 69 0 107 0 amapchunkpl 152 4528 0 4384 35 29 6 19 0 158 0 amappl16 192 3854 0 3117 63 25 38 48 0 8 1 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 218 0 211 1 0 1 1 0 8 0 amappl13 168 206 0 204 1 0 1 1 0 8 0 amappl12 160 25 0 21 1 0 1 1 0 8 0 amappl11 152 215 0 206 1 0 1 1 0 8 0 amappl10 144 87 0 79 1 0 1 1 0 8 0 amappl9 136 367 0 366 1 0 1 1 0 8 0 amappl8 128 402 0 352 2 0 2 2 0 8 0 amappl7 120 218 0 201 1 0 1 1 0 8 0 amappl6 112 185 0 179 1 0 1 1 0 8 0 amappl5 104 544 0 533 1 0 1 1 0 8 0 amappl4 96 640 0 611 1 0 1 1 0 8 0 amappl3 88 312 0 306 1 0 1 1 0 8 0 amappl2 80 5234 0 5169 2 0 2 2 0 8 0 amappl1 72 23822 0 23409 24 15 9 17 0 8 0 amappl 80 1797 0 1752 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 18 0 17 1 0 1 1 0 8 0 aobjpl 64 21 0 10 1 0 1 1 0 8 0 uaddrrnd 24 815 0 797 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 815 0 797 1 0 1 1 0 8 0 vmmpekpl 168 8855 0 8822 2 0 2 2 0 8 0 vmmpepl 168 100763 0 98984 155 71 84 110 0 357 0 vmsppl 272 814 0 797 2 0 2 2 0 8 0 pdppl 4096 1636 0 1599 8 2 6 6 0 8 0 pvpl 32 269807 0 253433 193 58 135 166 0 265 0 pmappl 200 814 0 797 3 2 1 2 0 8 0 extentpl 40 46 0 29 1 0 1 1 0 8 0 phpool 112 268 0 41 7 0 7 7 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821e1d1f) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bbd50,fffffd806b550000) at pool_do_put+0x36a pool_put(ffffffff825bbd50,fffffd806b550000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b550000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e818ba8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e818ba8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a1d278) 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(ffff80001e818cd0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d7fc8f0,7,fffffd806c3bf960,ffff80001d7514f8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd805804ab50,ffff80001d7514f8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd805804ab50,ffff80001d7514f8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d7514f8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d7514f8,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d7514f8,ffff80001e818f60,ffff80001e818fb0) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e819030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1070, count: -18 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic(ffffffff821e1d1f) at panic+0x15c sys/kern/subr_prf.c:207 pool_do_put(ffffffff825bbd50,fffffd806b550000) at pool_do_put+0x36a pool_put(ffffffff825bbd50,fffffd806b550000) at pool_put+0x4b sys/kern/subr_pool.c:794 m_free(fffffd806b550000) at m_free+0x119 sys/kern/uipc_mbuf.c:459 ml_purge(ffff80001e818ba8) at ml_purge+0x50 m_freem sys/kern/uipc_mbuf.c:538 [inline] ml_purge(ffff80001e818ba8) at ml_purge+0x50 sys/kern/uipc_mbuf.c:1628 ifq_purge(ffff800000a1d278) 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(ffff80001e818cd0) at spec_close+0x311 sys/kern/spec_vnops.c:555 VOP_CLOSE(fffffd805d7fc8f0,7,fffffd806c3bf960,ffff80001d7514f8) at VOP_CLOSE+0xc0 sys/kern/vfs_vops.c:174 vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffd805804ab50,ffff80001d7514f8) at vn_closefile+0xd2 sys/kern/vfs_vnops.c:614 fdrop(fffffd805804ab50,ffff80001d7514f8) at fdrop+0xc2 sys/kern/kern_descrip.c:1276 closef(fffffd805804ab50,ffff80001d7514f8) at closef+0x117 sys/kern/kern_descrip.c:1260 fdfree(ffff80001d7514f8) at fdfree+0x100 sys/kern/kern_descrip.c:1192 exit1(ffff80001d7514f8,0,0,1) at exit1+0x32c sys/kern/kern_exit.c:197 sys_exit(ffff80001d7514f8,ffff80001e818f60,ffff80001e818fb0) at sys_exit+0x16 sys/kern/kern_exit.c:95 syscall(ffff80001e819030) at syscall+0x507 sys/arch/amd64/amd64/trap.c:570 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe1070, count: -18