panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *188115 70686 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 zlibVersion() at zlibVersion 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(fffffd802a111610,80085761,ffff800014a364f0,2,fffffd803f7c6b40,ffff8000ffff2018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803bd96900,80085761,ffff800014a364f0,ffff8000ffff2018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2018,ffff800014a36638,ffff800014a36620) at sys_ioctl+0x638 syscall(ffff800014a366d0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ca349bb7010) at Xsyscall+0x128 end of kernel end trace frame: 0xca583d242e0, 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:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 zlibVersion() at zlibVersion 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(fffffd802a111610,80085761,ffff800014a364f0,2,fffffd803f7c6b40,ffff8000ffff2018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803bd96900,80085761,ffff800014a364f0,ffff8000ffff2018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2018,ffff800014a36638,ffff800014a36620) at sys_ioctl+0x638 syscall(ffff800014a366d0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ca349bb7010) at Xsyscall+0x128 end of kernel end trace frame: 0xca583d242e0, count: -10 ddb> show registers rdi 0xffffffff8135e2c7 db_enter+0x17 rsi 0x17cd __ALIGN_SIZE+0x7cd rbp 0xffff800014a36130 rbx 0xffff800014a361e0 rdx 0x17ce __ALIGN_SIZE+0x7ce rcx 0xffff80000213b000 rax 0xffff80000213b000 r8 0xffff800014a360f0 r9 0x1 r10 0xffff80000173a840 r11 0x26ace9109c0873ed r12 0x3000000008 r13 0xffff800014a36140 r14 0x100 r15 0x1 rip 0xffffffff8135e2c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a36120 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=188115 stat=onproc flags process=0 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff24c8,0xffffffff82250208 process=0xffff8000ffff7708 user=0xffff800014a31000, vmspace=0xfffffd803f013210 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 70686 190242 76202 0 2 0 syz-executor.0 *70686 188115 76202 0 7 0x4000000 syz-executor.0 86126 122680 27982 0 2 0 syz-executor.1 86126 169864 27982 0 2 0x4000000 syz-executor.1 86126 27718 27982 0 3 0x4000000 inode syz-executor.1 27982 247474 18645 0 3 0x82 nanosleep syz-executor.1 76202 180243 18645 0 3 0x82 nanosleep syz-executor.0 61879 369548 0 0 3 0x14200 bored sosplice 18645 326716 71300 0 3 0x82 thrsleep syz-fuzzer 18645 297478 71300 0 3 0x4000082 thrsleep syz-fuzzer 18645 80172 71300 0 3 0x4000082 thrsleep syz-fuzzer 18645 385408 71300 0 3 0x4000082 thrsleep syz-fuzzer 18645 365501 71300 0 3 0x4000082 thrsleep syz-fuzzer 18645 2886 71300 0 3 0x4000082 kqread syz-fuzzer 18645 452150 71300 0 3 0x4000082 thrsleep syz-fuzzer 18645 326362 71300 0 3 0x4000082 thrsleep syz-fuzzer 71300 114463 85666 0 3 0x10008a pause ksh 85666 512892 20665 0 3 0x92 select sshd 57492 320727 1 0 3 0x100083 ttyin getty 20665 407523 1 0 3 0x80 select sshd 8801 480890 45491 73 3 0x100090 kqread syslogd 45491 341430 1 0 3 0x100082 netio syslogd 71848 302411 1 77 3 0x100090 poll dhclient 17790 461112 1 0 3 0x80 poll dhclient 50154 283122 0 0 2 0x14200 zerothread 25417 148298 0 0 3 0x14200 aiodoned aiodoned 87326 201455 0 0 3 0x14200 syncer update 75505 394743 0 0 3 0x14200 cleaner cleaner 24940 101715 0 0 3 0x14200 reaper reaper 61295 267957 0 0 3 0x14200 pgdaemon pagedaemon 57836 490116 0 0 3 0x14200 bored crynlk 60564 337573 0 0 3 0x14200 bored crypto 75899 129087 0 0 3 0x40014200 acpi0 acpi0 94883 406550 0 0 3 0x14200 bored softnet 72018 97756 0 0 3 0x14200 bored systqmp 50821 375329 0 0 3 0x14200 bored systq 65144 172257 0 0 3 0x40014200 bored softclock 59810 403411 0 0 3 0x40014200 idle0 79048 334361 0 0 3 0x14200 bored smr 1 63526 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 9472 6345K 6349K 78643K 10804 0 0 pcb 23 9K 10K 78643K 333 0 0 rtable 100 3K 3K 78643K 415 0 0 ifaddr 46 11K 12K 78643K 119 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 26 0 0 iov 1 12K 24K 78643K 93 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 1615 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 9 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 88 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 584 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 42 30K 54K 78643K 456 0 0 subproc 64 65538K 69634K 78643K 238 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 97 0 0 in_multi 33 2K 2K 78643K 127 0 0 ether_multi 1 0K 0K 78643K 9 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 244 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 90 21K 23K 78643K 2194 0 0 UVM aobj 30 2K 2K 78643K 30 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 26 0 0 NDP 8 0K 0K 78643K 38 0 0 temp 125 2350K 2416K 78643K 4653 0 0 kqueue 0 0K 0K 78643K 8 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 9 0 5 1 0 1 1 0 8 0 inpcbpl 280 338 0 331 1 0 1 1 0 8 0 plimitpl 152 38 0 31 1 0 1 1 0 8 0 rtentry 112 86 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 132 0 128 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 ppxss 1128 8 0 8 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 403 0 215 12 0 12 12 0 8 0 art_table 32 404 0 215 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 84 0 74 1 0 1 1 0 8 0 shmpl 112 28 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2443 0 1011 47 0 47 47 0 8 0 ffsino 240 2443 0 1011 85 0 85 85 0 8 0 nchpl 144 3464 0 1818 62 0 62 62 0 8 0 uvmvnodes 72 2644 0 0 49 0 49 49 0 8 0 vnodes 200 2644 0 0 140 0 140 140 0 8 0 namei 1024 10018 0 10018 2 1 1 1 0 8 1 scxspl 192 13594 0 13594 7 6 1 6 0 8 1 sigapl 432 737 0 723 2 0 2 2 0 8 0 futexpl 56 9524 0 9524 1 0 1 1 0 8 1 knotepl 112 306 0 279 2 1 1 2 0 8 0 kqueuepl 104 168 0 166 1 0 1 1 0 8 0 pipepl 112 516 0 497 2 1 1 1 0 8 0 fdescpl 424 738 0 723 2 0 2 2 0 8 0 filepl 120 4483 0 4382 4 0 4 4 0 8 0 lockfpl 104 192 0 190 4 3 1 1 0 8 0 lockfspl 32 211 0 209 4 3 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 32 0 22 1 0 1 1 0 8 0 ucredpl 96 965 0 958 1 0 1 1 0 8 0 zombiepl 144 723 0 723 2 1 1 1 0 8 1 processpl 840 753 0 723 4 0 4 4 0 8 0 procpl 600 1500 0 1460 4 0 4 4 0 8 0 sosppl 128 11 0 11 3 2 1 1 0 8 1 sockpl 384 606 0 589 3 0 3 3 0 8 1 mcl64k 65536 494 0 494 63 31 32 33 0 8 32 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 8 0 8 1 1 0 1 0 8 0 mcl9k 9216 13 0 13 3 2 1 1 0 8 1 mcl8k 8192 7 0 7 5 5 0 1 0 8 0 mcl4k 4096 43 0 43 4 3 1 1 0 8 1 mcl2k2 2112 3 0 3 2 2 0 1 0 8 0 mcl2k 2048 47563 0 47525 12 6 6 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 85109 0 85037 63 48 15 44 0 8 8 bufpl 256 7922 0 2461 342 0 342 342 0 8 0 anonpl 16 97693 0 88762 71 19 52 52 0 62 16 amapchunkpl 152 3471 0 3362 16 11 5 15 0 158 0 amappl16 192 3946 0 3490 60 28 32 35 0 8 8 amappl15 184 260 0 254 1 0 1 1 0 8 0 amappl14 176 198 0 190 1 0 1 1 0 8 0 amappl13 168 39 0 36 1 0 1 1 0 8 0 amappl12 160 169 0 169 2 2 0 1 0 8 0 amappl11 152 450 0 439 1 0 1 1 0 8 0 amappl10 144 165 0 164 2 1 1 1 0 8 0 amappl9 136 619 0 612 1 0 1 1 0 8 0 amappl8 128 303 0 285 1 0 1 1 0 8 0 amappl7 120 38 0 32 1 0 1 1 0 8 0 amappl6 112 60 0 53 1 0 1 1 0 8 0 amappl5 104 204 0 192 1 0 1 1 0 8 0 amappl4 96 271 0 248 1 0 1 1 0 8 0 amappl3 88 205 0 199 1 0 1 1 0 8 0 amappl2 80 5943 0 5882 2 0 2 2 0 8 0 amappl1 72 22595 0 22170 26 17 9 19 0 8 0 amappl 72 1744 0 1704 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 29 0 0 1 0 1 1 0 8 0 uaddrrnd 24 738 0 723 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 738 0 723 1 0 1 1 0 8 0 vmmpekpl 168 9193 0 9170 4 2 2 2 0 8 0 vmmpepl 168 87389 0 85919 108 33 75 80 0 357 10 vmsppl 264 737 0 723 3 2 1 2 0 8 0 pdppl 4096 1482 0 1446 6 1 5 6 0 8 0 pvpl 32 334629 0 322524 234 35 199 221 0 265 101 pmappl 192 737 0 723 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 602 0 98 15 0 15 15 0 8 0