panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *479557 69078 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 deflateInit_(ffffffff80000000,8,2,2) at deflateInit_ wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d6c04c8,80085761,ffff800014a20090,2,fffffd803f7c69c0,ffff8000ffff9520) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802ea40008,80085761,ffff800014a20090,ffff8000ffff9520) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff9520,ffff800014a201d8,ffff800014a201c0) at sys_ioctl+0x638 syscall(ffff800014a20270) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ee0fdb94010) at Xsyscall+0x128 end of kernel end trace frame: 0xee3a6960e60, count: 5 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 mallocarray: overflow 18446744071562067968 * 8 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 deflateInit_(ffffffff80000000,8,2,2) at deflateInit_ wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d6c04c8,80085761,ffff800014a20090,2,fffffd803f7c69c0,ffff8000ffff9520) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802ea40008,80085761,ffff800014a20090,ffff8000ffff9520) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff9520,ffff800014a201d8,ffff800014a201c0) at sys_ioctl+0x638 syscall(ffff800014a20270) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ee0fdb94010) at Xsyscall+0x128 end of kernel end trace frame: 0xee3a6960e60, count: -10 ddb> show registers rdi 0xffffffff810e7007 db_enter+0x17 rsi 0x18ff __ALIGN_SIZE+0x8ff rbp 0xffff800014a1fcd0 rbx 0xffff800014a1fd80 rdx 0x1900 __ALIGN_SIZE+0x900 rcx 0xffff800002b3d000 rax 0xffff800002b3d000 r8 0xffff800014a1fc90 r9 0x1 r10 0xffff800001942440 r11 0x15d844d41731b45c r12 0x3000000008 r13 0xffff800014a1fce0 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1fcc0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=479557 stat=onproc flags process=0 proc=4000000 pri=74, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8260,0xffffffff82254d50 process=0xffff8000ffff6d30 user=0xffff800014a1b000, vmspace=0xfffffd803f013420 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 69078 190584 88601 0 2 0 syz-executor.1 *69078 479557 88601 0 7 0x4000000 syz-executor.1 88601 6369 54034 0 3 0x82 nanosleep syz-executor.1 19634 107484 54034 0 2 0x2 syz-executor.0 8531 69005 0 0 3 0x14200 bored sosplice 54034 98695 68507 0 3 0x82 kqread syz-fuzzer 54034 455450 68507 0 3 0x4000082 nanosleep syz-fuzzer 54034 428213 68507 0 3 0x4000082 thrsleep syz-fuzzer 54034 204620 68507 0 3 0x4000082 thrsleep syz-fuzzer 54034 54837 68507 0 3 0x4000082 thrsleep syz-fuzzer 54034 188781 68507 0 3 0x4000082 thrsleep syz-fuzzer 54034 376028 68507 0 3 0x4000082 thrsleep syz-fuzzer 54034 31411 68507 0 3 0x4000082 thrsleep syz-fuzzer 68507 7051 97387 0 3 0x10008a pause ksh 97387 140094 54642 0 3 0x92 select sshd 83236 122428 1 0 3 0x100083 ttyin getty 54642 159910 1 0 3 0x80 select sshd 25864 8050 50583 73 3 0x100090 kqread syslogd 50583 74143 1 0 3 0x100082 netio syslogd 97463 110534 1 77 3 0x100090 poll dhclient 46895 515641 1 0 3 0x80 poll dhclient 63454 367934 0 0 2 0x14200 zerothread 46322 258458 0 0 3 0x14200 aiodoned aiodoned 58882 165452 0 0 3 0x14200 syncer update 45616 406291 0 0 3 0x14200 cleaner cleaner 44400 493990 0 0 3 0x14200 reaper reaper 81843 448204 0 0 3 0x14200 pgdaemon pagedaemon 54137 131214 0 0 3 0x14200 bored crynlk 50573 14753 0 0 3 0x14200 bored crypto 54593 447505 0 0 3 0x40014200 acpi0 acpi0 96207 416569 0 0 3 0x14200 bored softnet 84094 312660 0 0 3 0x14200 bored systqmp 58992 200839 0 0 3 0x14200 bored systq 25654 39472 0 0 3 0x40014200 bored softclock 18539 64057 0 0 3 0x40014200 idle0 65228 270998 0 0 3 0x14200 bored smr 1 13029 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 Kern Lim devbuf 9513 6342K 6366K 78643K 11584 0 0 pcb 23 9K 11K 78643K 1152 0 0 rtable 103 3K 4K 78643K 1583 0 0 ifaddr 58 14K 15K 78643K 461 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 86 0 0 iov 0 0K 24K 78643K 303 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1192 75K 76K 78643K 2817 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 82 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 285 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 2715 0 0 sigio 0 0K 0K 78643K 30 0 0 proc 45 38K 46K 78643K 1065 0 0 subproc 64 65538K 67586K 78643K 1129 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 181 0 0 in_multi 33 2K 2K 78643K 418 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 491 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 80 20K 38K 78643K 7993 0 0 UVM aobj 130 6K 6K 78643K 141 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 149 0 0 NDP 12 0K 0K 78643K 166 0 0 temp 170 2359K 2427K 78643K 12103 0 0 kqueue 0 0K 0K 78643K 16 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 35 0 31 1 0 1 1 0 8 0 inpcbpl 280 1015 0 1008 1 0 1 1 0 8 0 plimitpl 152 104 0 97 1 0 1 1 0 8 0 rtentry 112 324 0 284 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 37 0 37 1 1 0 1 0 8 0 tcpcb 544 342 0 338 1 0 1 1 0 8 0 nd6 48 66 0 62 1 0 1 1 0 8 0 ppxss 1128 48 0 48 17 16 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1500 0 1309 12 0 12 12 0 8 0 art_table 32 1501 0 1309 2 0 2 2 0 8 0 art_node 16 319 0 285 1 0 1 1 0 8 0 sysvmsgpl 40 94 0 92 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 279 0 269 1 0 1 1 0 8 0 shmpl 112 139 0 11 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5986 0 4525 49 1 48 48 0 8 0 ffsino 240 5986 0 4525 87 0 87 87 0 8 0 nchpl 144 9737 0 8091 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 32102 0 32102 3 2 1 1 0 8 1 scsiplug 64 9 0 9 7 7 0 1 0 8 0 scxspl 192 35739 0 35739 14 13 1 6 0 8 1 sigapl 432 2792 0 2779 2 0 2 2 0 8 0 futexpl 56 36549 0 36549 2 1 1 1 0 8 1 knotepl 112 1051 0 1032 1 0 1 1 0 8 0 kqueuepl 104 543 0 541 1 0 1 1 0 8 0 pipepl 112 1502 0 1483 5 4 1 2 0 8 0 fdescpl 424 2793 0 2779 2 0 2 2 0 8 0 filepl 120 17132 0 17037 10 6 4 5 0 8 0 lockfpl 104 1379 0 1379 11 10 1 1 0 8 1 lockfspl 32 680 0 680 11 10 1 1 0 8 1 sessionpl 112 48 0 38 1 0 1 1 0 8 0 pgrppl 48 70 0 60 1 0 1 1 0 8 0 ucredpl 96 4094 0 4087 1 0 1 1 0 8 0 zombiepl 144 2779 0 2779 2 1 1 1 0 8 1 processpl 840 2808 0 2779 4 0 4 4 0 8 0 procpl 600 6809 0 6772 5 1 4 4 0 8 1 sosppl 128 25 0 25 7 7 0 1 0 8 0 sockpl 384 2010 0 1993 18 15 3 4 0 8 1 mcl64k 65536 700 0 700 97 97 0 47 0 8 0 mcl16k 16384 5 0 5 5 5 0 1 0 8 0 mcl12k 12288 71 0 71 20 20 0 1 0 8 0 mcl9k 9216 65 0 65 16 16 0 1 0 8 0 mcl8k 8192 26 0 26 17 16 1 1 0 8 1 mcl4k 4096 101 0 101 23 22 1 1 0 8 1 mcl2k2 2112 15 0 15 9 9 0 1 0 8 0 mcl2k 2048 50493 0 50455 16 10 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 99606 0 99528 56 49 7 28 0 8 0 bufpl 256 12750 0 7083 355 0 355 355 0 8 0 anonpl 16 292866 0 284742 163 123 40 54 0 62 0 amapchunkpl 152 13851 0 13771 31 26 5 14 0 158 0 amappl16 192 15116 0 14637 165 140 25 37 0 8 0 amappl15 184 105 0 101 1 0 1 1 0 8 0 amappl14 176 941 0 940 2 1 1 1 0 8 0 amappl13 168 179 0 176 1 0 1 1 0 8 0 amappl12 160 904 0 899 1 0 1 1 0 8 0 amappl11 152 557 0 546 1 0 1 1 0 8 0 amappl10 144 234 0 231 3 2 1 1 0 8 0 amappl9 136 937 0 934 1 0 1 1 0 8 0 amappl8 128 485 0 466 1 0 1 1 0 8 0 amappl7 120 100 0 94 1 0 1 1 0 8 0 amappl6 112 549 0 540 1 0 1 1 0 8 0 amappl5 104 1101 0 1087 1 0 1 1 0 8 0 amappl4 96 2456 0 2428 2 1 1 2 0 8 0 amappl3 88 1127 0 1122 1 0 1 1 0 8 0 amappl2 80 23004 0 22954 2 0 2 2 0 8 0 amappl1 72 62848 0 62434 25 15 10 19 0 8 0 amappl 72 7204 0 7172 1 0 1 1 0 75 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 dma64 64 259 0 259 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 140 0 11 3 0 3 3 0 8 0 uaddrrnd 24 2793 0 2779 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2793 0 2779 1 0 1 1 0 8 0 vmmpekpl 168 22893 0 22870 2 0 2 2 0 8 0 vmmpepl 168 304201 0 302796 266 193 73 83 0 357 6 vmsppl 264 2792 0 2779 14 13 1 2 0 8 0 pdppl 4096 5592 0 5558 5 0 5 5 0 8 0 pvpl 32 890458 0 879180 463 363 100 241 0 265 0 pmappl 192 2792 0 2779 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 683 0 203 15 0 15 15 0 8 0