panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *389230 50311 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,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d0ec9f8,80085761,ffff80001494ab20,42,fffffd803f7c6ae0,ffff800014a23090) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8039ffd9d8,80085761,ffff80001494ab20,ffff800014a23090) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a23090,ffff80001494ac68,ffff80001494ac50) at sys_ioctl+0x638 syscall(ffff80001494ad00) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,c9698988010) at Xsyscall+0x128 end of kernel end trace frame: 0xc98ba35d370, 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,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d0ec9f8,80085761,ffff80001494ab20,42,fffffd803f7c6ae0,ffff800014a23090) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8039ffd9d8,80085761,ffff80001494ab20,ffff800014a23090) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a23090,ffff80001494ac68,ffff80001494ac50) at sys_ioctl+0x638 syscall(ffff80001494ad00) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,c9698988010) at Xsyscall+0x128 end of kernel end trace frame: 0xc98ba35d370, count: -10 ddb> show registers rdi 0xffffffff81c210d7 db_enter+0x17 rsi 0x185d __ALIGN_SIZE+0x85d rbp 0xffff80001494a760 rbx 0xffff80001494a810 rdx 0x185e __ALIGN_SIZE+0x85e rcx 0xffff800003976000 rax 0xffff800003976000 r8 0xffff80001494a720 r9 0x1 r10 0xffff80000173be80 r11 0x787029c4accbf55b r12 0x3000000008 r13 0xffff80001494a770 r14 0x100 r15 0x1 rip 0xffffffff81c210d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff80001494a750 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=389230 stat=onproc flags process=0 proc=4000000 pri=66, usrpri=66, nice=20 forw=0xffffffffffffffff, list=0xffff800014a23798,0xffffffff82252c30 process=0xffff8000ffff6d30 user=0xffff800014945000, vmspace=0xfffffd803f014318 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 50311 223450 71567 0 3 0x80 fsleep syz-executor.0 *50311 389230 71567 0 7 0x4000000 syz-executor.0 71567 212820 54601 0 3 0x82 nanosleep syz-executor.0 54704 439486 54601 0 2 0x482 syz-executor.1 1955 366750 0 0 3 0x14200 bored sosplice 54601 324219 85963 0 3 0x82 thrsleep syz-fuzzer 54601 447130 85963 0 2 0x4000482 syz-fuzzer 54601 37823 85963 0 3 0x4000082 thrsleep syz-fuzzer 54601 119113 85963 0 3 0x4000082 thrsleep syz-fuzzer 54601 298915 85963 0 3 0x4000082 kqread syz-fuzzer 54601 460980 85963 0 3 0x4000082 thrsleep syz-fuzzer 54601 50311 85963 0 3 0x4000082 thrsleep syz-fuzzer 54601 331941 85963 0 3 0x4000082 thrsleep syz-fuzzer 85963 326323 85026 0 3 0x10008a pause ksh 85026 280257 96770 0 3 0x92 select sshd 13704 385333 1 0 3 0x100083 ttyin getty 96770 500011 1 0 3 0x80 select sshd 92747 71691 95201 73 3 0x100090 kqread syslogd 95201 446869 1 0 3 0x100082 netio syslogd 95234 235203 0 0 2 0x14200 zerothread 76527 360796 0 0 3 0x14200 aiodoned aiodoned 20214 43913 0 0 3 0x14200 syncer update 45693 415111 0 0 3 0x14200 cleaner cleaner 38297 187800 0 0 3 0x14200 reaper reaper 64200 303326 0 0 3 0x14200 pgdaemon pagedaemon 72169 89089 0 0 3 0x14200 bored crynlk 59428 170942 0 0 3 0x14200 bored crypto 23832 151980 0 0 3 0x40014200 acpi0 acpi0 88538 221190 0 0 2 0x14200 softnet 1175 4028 0 0 3 0x14200 bored systqmp 38029 512171 0 0 3 0x14200 bored systq 69240 73914 0 0 3 0x40014200 bored softclock 53587 315462 0 0 3 0x40014200 idle0 91610 277733 0 0 3 0x14200 bored smr 1 453027 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 9493 6283K 6322K 78643K 11115 0 0 pcb 19 8K 10K 78643K 852 0 0 rtable 100 3K 3K 78643K 445 0 0 ifaddr 56 14K 15K 78643K 305 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 39 0 0 iov 0 0K 32K 78643K 185 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1184 74K 75K 78643K 1981 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 18 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 194 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 1329 0 0 sigio 0 0K 0K 78643K 34 0 0 proc 42 30K 46K 78643K 667 0 0 subproc 64 65538K 67586K 78643K 476 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 153 0 0 in_multi 33 2K 2K 78643K 195 0 0 ether_multi 1 0K 0K 78643K 3 0 0 mrt 0 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 352 0 0 pfkey data 0 0K 0K 78643K 4 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 71 20K 38K 78643K 3886 0 0 UVM aobj 53 4K 4K 78643K 58 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 79 0 0 NDP 11 0K 0K 78643K 98 0 0 temp 163 2359K 2425K 78643K 7301 0 0 kqueue 0 0K 0K 78643K 11 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 16 0 12 1 0 1 1 0 8 0 inpcbpl 280 695 0 691 1 0 1 1 0 8 0 plimitpl 152 61 0 55 1 0 1 1 0 8 0 rtentry 112 149 0 109 3 1 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 229 0 225 1 0 1 1 0 8 0 nd6 48 28 0 24 2 1 1 1 0 8 0 swfcl 56 2 0 0 1 0 1 1 0 8 0 ppxss 1128 31 0 31 7 7 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 706 0 514 14 2 12 13 0 8 0 art_table 32 707 0 514 3 1 2 2 0 8 0 art_node 16 148 0 114 1 0 1 1 0 8 0 sysvmsgpl 40 5 0 2 1 0 1 1 0 8 0 semapl 112 188 0 178 1 0 1 1 0 8 0 shmpl 112 56 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3672 0 2218 48 0 48 48 0 8 0 ffsino 240 3672 0 2218 86 0 86 86 0 8 0 nchpl 144 5710 0 4056 62 0 62 62 0 8 0 uvmvnodes 72 4013 0 0 73 0 73 73 0 8 0 vnodes 200 4013 0 0 212 0 212 212 0 8 0 namei 1024 18360 0 18360 2 1 1 1 0 8 1 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 19820 0 19820 15 14 1 6 0 8 1 sigapl 432 1463 0 1452 2 0 2 2 0 8 0 futexpl 56 22170 0 22169 2 1 1 1 0 8 0 knotepl 112 564 0 545 1 0 1 1 0 8 0 kqueuepl 104 409 0 407 1 0 1 1 0 8 0 pipepl 112 1040 0 1021 3 2 1 2 0 8 0 fdescpl 424 1464 0 1452 2 0 2 2 0 8 0 filepl 120 9798 0 9713 9 5 4 4 0 8 1 lockfpl 104 371 0 370 5 4 1 1 0 8 0 lockfspl 32 238 0 237 5 4 1 1 0 8 0 sessionpl 112 29 0 21 1 0 1 1 0 8 0 pgrppl 48 55 0 47 1 0 1 1 0 8 0 ucredpl 96 2095 0 2089 1 0 1 1 0 8 0 zombiepl 144 1452 0 1451 1 0 1 1 0 8 0 processpl 840 1479 0 1451 4 0 4 4 0 8 0 procpl 600 3059 0 3023 6 2 4 4 0 8 0 sosppl 128 24 0 24 4 4 0 1 0 8 0 sockpl 384 1440 0 1430 6 4 2 3 0 8 0 mcl64k 65536 752 0 752 92 74 18 33 0 8 18 mcl16k 16384 5 0 5 4 4 0 1 0 8 0 mcl12k 12288 19 0 19 6 6 0 1 0 8 0 mcl9k 9216 21 0 21 7 7 0 1 0 8 0 mcl8k 8192 16 0 16 6 6 0 1 0 8 0 mcl4k 4096 82 0 82 4 4 0 1 0 8 0 mcl2k2 2112 9 0 9 5 5 0 1 0 8 0 mcl2k 2048 49195 0 49158 13 8 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 91094 0 91022 75 69 6 43 0 8 0 bufpl 256 9520 0 3857 355 0 355 355 0 8 0 anonpl 16 157502 0 149069 87 50 37 52 0 62 0 amapchunkpl 152 6174 0 6100 19 15 4 14 0 158 0 amappl16 192 7761 0 7282 81 56 25 36 0 8 1 amappl15 184 113 0 109 1 0 1 1 0 8 0 amappl14 176 330 0 328 1 0 1 1 0 8 0 amappl13 168 270 0 265 1 0 1 1 0 8 0 amappl12 160 369 0 368 1 0 1 1 0 8 0 amappl11 152 159 0 155 1 0 1 1 0 8 0 amappl10 144 273 0 272 2 1 1 1 0 8 0 amappl9 136 660 0 654 1 0 1 1 0 8 0 amappl8 128 238 0 220 1 0 1 1 0 8 0 amappl7 120 57 0 52 1 0 1 1 0 8 0 amappl6 112 193 0 187 1 0 1 1 0 8 0 amappl5 104 267 0 259 1 0 1 1 0 8 0 amappl4 96 1378 0 1353 2 1 1 2 0 8 0 amappl3 88 701 0 695 1 0 1 1 0 8 0 amappl2 80 11854 0 11808 2 0 2 2 0 8 1 amappl1 72 35894 0 35518 26 18 8 19 0 8 0 amappl 72 3343 0 3315 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 57 0 5 1 0 1 1 0 8 0 uaddrrnd 24 1464 0 1452 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1464 0 1452 1 0 1 1 0 8 0 vmmpekpl 168 13722 0 13703 2 0 2 2 0 8 0 vmmpepl 168 157399 0 156073 135 69 66 79 0 357 4 vmsppl 264 1463 0 1452 1 0 1 1 0 8 0 pdppl 4096 2934 0 2904 6 1 5 5 0 8 0 pvpl 32 465707 0 454216 277 89 188 229 0 265 93 pmappl 192 1463 0 1452 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 664 0 171 16 1 15 15 0 8 0