panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *303491 52442 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 urlphy_match(ffffffff80000000,8,2) at urlphy_match wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001964a00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803ce6a078,80085761,ffff800014a0a0b0,82,fffffd803f7c6ae0,ffff8000ffff84b8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802eb091f0,80085761,ffff800014a0a0b0,ffff8000ffff84b8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff84b8,ffff800014a0a1f8,ffff800014a0a1e0) at sys_ioctl+0x638 syscall(ffff800014a0a290) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,374796d9010) at Xsyscall+0x128 end of kernel end trace frame: 0x37713ad4270, 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 urlphy_match(ffffffff80000000,8,2) at urlphy_match wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001964a00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803ce6a078,80085761,ffff800014a0a0b0,82,fffffd803f7c6ae0,ffff8000ffff84b8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802eb091f0,80085761,ffff800014a0a0b0,ffff8000ffff84b8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff84b8,ffff800014a0a1f8,ffff800014a0a1e0) at sys_ioctl+0x638 syscall(ffff800014a0a290) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,374796d9010) at Xsyscall+0x128 end of kernel end trace frame: 0x37713ad4270, count: -10 ddb> show registers rdi 0xffffffff81c210d7 db_enter+0x17 rsi 0x18db __ALIGN_SIZE+0x8db rbp 0xffff800014a09cf0 rbx 0xffff800014a09da0 rdx 0x18dc __ALIGN_SIZE+0x8dc rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a09cb0 r9 0x1 r10 0xffff800000936ec0 r11 0x5d3769de8b981630 r12 0x3000000008 r13 0xffff800014a09d00 r14 0x100 r15 0x1 rip 0xffffffff81c210d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a09ce0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=303491 stat=onproc flags process=0 proc=4000000 pri=69, usrpri=69, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff9070,0xffffffff82252c30 process=0xffff8000ffff6d30 user=0xffff800014a05000, vmspace=0xfffffd803f014d68 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 52442 413654 10680 0 2 0 syz-executor.0 *52442 303491 10680 0 7 0x4000000 syz-executor.0 76398 440178 28763 0 2 0x2 syz-executor.1 10680 458036 28763 0 3 0x82 nanosleep syz-executor.0 28763 328466 13055 0 3 0x82 kqread syz-fuzzer 28763 264750 13055 0 3 0x4000082 thrsleep syz-fuzzer 28763 335285 13055 0 3 0x4000082 thrsleep syz-fuzzer 28763 513924 13055 0 3 0x4000082 thrsleep syz-fuzzer 28763 401210 13055 0 3 0x4000082 thrsleep syz-fuzzer 28763 106975 13055 0 3 0x4000082 thrsleep syz-fuzzer 28763 409032 13055 0 3 0x4000082 thrsleep syz-fuzzer 13055 351755 17402 0 3 0x10008a pause ksh 17402 365474 26621 0 3 0x92 select sshd 50659 45271 1 0 3 0x100083 ttyin getty 26621 430907 1 0 3 0x80 select sshd 63325 471731 21632 73 3 0x100090 kqread syslogd 21632 16158 1 0 3 0x100082 netio syslogd 27970 115597 1 77 3 0x100090 poll dhclient 72157 22912 1 0 3 0x80 poll dhclient 89722 445473 0 0 2 0x14200 zerothread 86384 8901 0 0 3 0x14200 aiodoned aiodoned 33973 942 0 0 3 0x14200 syncer update 62157 117665 0 0 3 0x14200 cleaner cleaner 30545 49991 0 0 3 0x14200 reaper reaper 58433 342718 0 0 3 0x14200 pgdaemon pagedaemon 45003 240309 0 0 3 0x14200 bored crynlk 24074 96079 0 0 3 0x14200 bored crypto 76173 519352 0 0 3 0x40014200 acpi0 acpi0 63279 68763 0 0 3 0x14200 bored softnet 3141 410105 0 0 3 0x14200 bored systqmp 46280 463444 0 0 3 0x14200 bored systq 69834 308200 0 0 3 0x40014200 bored softclock 68810 181391 0 0 3 0x40014200 idle0 67341 401614 0 0 3 0x14200 bored smr 1 273757 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 9461 6341K 6341K 78643K 10600 0 0 pcb 23 9K 9K 78643K 105 0 0 rtable 100 3K 3K 78643K 204 0 0 ifaddr 42 11K 11K 78643K 63 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 18 0 0 iov 0 0K 16K 78643K 16 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 1254 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 14 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 122 0 0 proc 41 30K 46K 78643K 253 0 0 subproc 64 65538K 67586K 78643K 68 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 18 0 0 in_multi 33 2K 2K 78643K 34 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 171 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 76 20K 24K 78643K 1032 0 0 UVM aobj 11 2K 2K 78643K 12 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 5 0 0 NDP 7 0K 0K 78643K 16 0 0 temp 94 2344K 2410K 78643K 3183 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 100 0 93 1 0 1 1 0 8 0 plimitpl 152 18 0 11 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 4 0 4 1 1 0 1 0 8 0 tcpcb 544 46 0 42 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 5 0 5 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 184 0 0 12 0 12 12 0 8 0 art_table 32 185 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 12 0 2 1 0 1 1 0 8 0 shmpl 112 10 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1617 0 214 46 0 46 46 0 8 0 ffsino 240 1617 0 214 83 0 83 83 0 8 0 nchpl 144 1995 0 372 61 0 61 61 0 8 0 uvmvnodes 72 1664 0 0 31 0 31 31 0 8 0 vnodes 200 1664 0 0 88 0 88 88 0 8 0 namei 1024 4933 0 4932 2 1 1 1 0 8 0 scxspl 192 5027 0 5027 7 6 1 6 0 8 1 sigapl 432 292 0 279 2 0 2 2 0 8 0 futexpl 56 1695 0 1695 1 0 1 1 0 8 1 knotepl 112 69 0 50 1 0 1 1 0 8 0 kqueuepl 104 36 0 34 1 0 1 1 0 8 0 pipepl 112 178 0 159 2 1 1 1 0 8 0 fdescpl 424 293 0 279 2 0 2 2 0 8 0 filepl 120 1560 0 1464 4 0 4 4 0 8 1 lockfpl 104 37 0 36 2 1 1 1 0 8 0 lockfspl 32 39 0 38 2 1 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 209 0 202 1 0 1 1 0 8 0 zombiepl 144 279 0 279 2 1 1 1 0 8 1 processpl 840 307 0 279 4 0 4 4 0 8 0 procpl 600 452 0 417 4 0 4 4 0 8 1 sockpl 384 174 0 157 3 0 3 3 0 8 1 mcl64k 65536 5 0 5 2 1 1 1 0 8 1 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl9k 9216 4 0 4 2 1 1 1 0 8 1 mcl8k 8192 1 0 1 1 1 0 1 0 8 0 mcl4k 4096 13 0 13 2 1 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 47275 0 47240 12 7 5 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 77671 0 77604 8 2 6 7 0 8 1 bufpl 256 5726 0 1262 280 0 280 280 0 8 0 anonpl 16 35199 0 26500 41 2 39 39 0 62 3 amapchunkpl 152 1156 0 1067 7 0 7 7 0 158 2 amappl16 192 880 0 424 24 0 24 24 0 8 1 amappl15 184 104 0 98 1 0 1 1 0 8 0 amappl14 176 26 0 22 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 10 0 9 2 1 1 1 0 8 0 amappl11 152 71 0 59 1 0 1 1 0 8 0 amappl10 144 107 0 104 2 1 1 1 0 8 0 amappl9 136 521 0 518 1 0 1 1 0 8 0 amappl8 128 111 0 99 1 0 1 1 0 8 0 amappl7 120 76 0 72 1 0 1 1 0 8 0 amappl6 112 50 0 45 1 0 1 1 0 8 0 amappl5 104 149 0 138 1 0 1 1 0 8 0 amappl4 96 475 0 452 1 0 1 1 0 8 0 amappl3 88 118 0 111 1 0 1 1 0 8 0 amappl2 80 1598 0 1547 2 0 2 2 0 8 0 amappl1 72 14275 0 13863 26 17 9 19 0 8 0 amappl 72 667 0 633 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 11 0 1 1 0 1 1 0 8 0 uaddrrnd 24 293 0 279 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 293 0 279 1 0 1 1 0 8 0 vmmpekpl 168 6112 0 6095 1 0 1 1 0 8 0 vmmpepl 168 37137 0 35768 89 18 71 76 0 357 11 vmsppl 264 292 0 279 2 1 1 2 0 8 0 pdppl 4096 592 0 558 5 0 5 5 0 8 0 pvpl 32 130350 0 118604 115 8 107 107 0 265 10 pmappl 192 292 0 279 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 415 0 16 12 0 12 12 0 8 0