panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *112775 18914 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 com_cardbus_match(ffffffff80000000,8,2) at com_cardbus_match wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff8000021c4b00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803c756358,80085761,ffff800014a2a570,f,fffffd803f7c6ae0,ffff8000fffef2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803c6712d8,80085761,ffff800014a2a570,ffff8000fffef2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000fffef2d8,ffff800014a2a6b8,ffff800014a2a6a0) at sys_ioctl+0x638 syscall(ffff800014a2a750) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e319d70b010) at Xsyscall+0x128 end of kernel end trace frame: 0xe347e608510, 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 com_cardbus_match(ffffffff80000000,8,2) at com_cardbus_match wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff8000021c4b00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803c756358,80085761,ffff800014a2a570,f,fffffd803f7c6ae0,ffff8000fffef2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803c6712d8,80085761,ffff800014a2a570,ffff8000fffef2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000fffef2d8,ffff800014a2a6b8,ffff800014a2a6a0) at sys_ioctl+0x638 syscall(ffff800014a2a750) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e319d70b010) at Xsyscall+0x128 end of kernel end trace frame: 0xe347e608510, count: -10 ddb> show registers rdi 0xffffffff81307427 db_enter+0x17 rsi 0x19b3 __ALIGN_SIZE+0x9b3 rbp 0xffff800014a2a1b0 rbx 0xffff800014a2a260 rdx 0x19b4 __ALIGN_SIZE+0x9b4 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a2a170 r9 0x1 r10 0xffff800000936f00 r11 0x7dab4db2112e0a8d r12 0x3000000008 r13 0xffff800014a2a1c0 r14 0x100 r15 0x1 rip 0xffffffff81307428 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a2a1a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=112775 stat=onproc flags process=0 proc=4000000 pri=67, usrpri=67, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffee978,0xffffffff82259c50 process=0xffff8000ffff7078 user=0xffff800014a25000, vmspace=0xfffffd803f014d68 estcpu=34, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 18914 93741 40741 0 2 0 syz-executor.1 *18914 112775 40741 0 7 0x4000000 syz-executor.1 63022 53234 43641 0 3 0 vmmaplk syz-executor.0 63022 73696 43641 0 3 0x4000000 vmmaplk syz-executor.0 63022 397331 43641 0 2 0x4000000 syz-executor.0 63022 517947 43641 0 3 0x4000000 vmmaplk syz-executor.0 79484 179777 1 0 3 0x100083 ttyin getty 65716 373244 0 0 3 0x14200 bored sosplice 43641 72756 51758 0 2 0x482 syz-executor.0 40741 302752 51758 0 3 0x82 nanosleep syz-executor.1 51758 183705 41276 0 3 0x82 thrsleep syz-fuzzer 51758 95959 41276 0 3 0x4000082 thrsleep syz-fuzzer 51758 154449 41276 0 3 0x4000082 thrsleep syz-fuzzer 51758 124230 41276 0 3 0x4000082 kqread syz-fuzzer 51758 96437 41276 0 3 0x4000082 thrsleep syz-fuzzer 51758 253227 41276 0 3 0x4000082 thrsleep syz-fuzzer 51758 222323 41276 0 3 0x4000082 thrsleep syz-fuzzer 51758 431159 41276 0 3 0x4000082 thrsleep syz-fuzzer 41276 249720 62627 0 3 0x10008a pause ksh 62627 500257 74361 0 3 0x92 select sshd 74361 61991 1 0 3 0x80 select sshd 49252 177109 14932 73 3 0x100090 kqread syslogd 14932 118726 1 0 3 0x100082 netio syslogd 77602 28317 1 77 3 0x100090 poll dhclient 99065 53982 1 0 3 0x80 poll dhclient 73640 440670 0 0 2 0x14200 zerothread 8853 350829 0 0 3 0x14200 aiodoned aiodoned 19290 279357 0 0 3 0x14200 syncer update 38372 226145 0 0 3 0x14200 cleaner cleaner 56344 82311 0 0 3 0x14200 reaper reaper 85637 14842 0 0 3 0x14200 pgdaemon pagedaemon 7656 142404 0 0 3 0x14200 bored crynlk 69823 489768 0 0 3 0x14200 bored crypto 25756 132261 0 0 3 0x40014200 acpi0 acpi0 44733 504585 0 0 3 0x14200 bored softnet 872 230837 0 0 3 0x14200 bored systqmp 28653 204190 0 0 3 0x14200 bored systq 22001 271422 0 0 3 0x40014200 bored softclock 59047 460668 0 0 3 0x40014200 idle0 95678 190406 0 0 3 0x14200 bored smr 1 299932 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 9540 6387K 6387K 78643K 12939 0 0 pcb 27 9K 11K 78643K 2301 0 0 rtable 100 3K 4K 78643K 1320 0 0 ifaddr 68 17K 19K 78643K 749 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 55 0 0 iov 0 0K 28K 78643K 557 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1188 74K 75K 78643K 4323 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 40 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 407 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 4886 0 0 sigio 0 0K 0K 78643K 61 0 0 proc 42 30K 46K 78643K 605 0 0 subproc 64 65538K 67586K 78643K 70 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 293 0 0 in_multi 33 2K 2K 78643K 150 0 0 ether_multi 1 0K 0K 78643K 18 0 0 mrt 0 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 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 593 0 0 pfkey data 0 0K 0K 78643K 2 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 100 21K 24K 78643K 12026 0 0 UVM aobj 130 5K 5K 78643K 150 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 800 0 0 NDP 15 0K 0K 78643K 196 0 0 temp 192 2360K 2435K 78643K 17154 0 0 kqueue 0 0K 0K 78643K 21 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 1996 0 1989 1 0 1 1 0 8 0 plimitpl 152 88 0 81 1 0 1 1 0 8 0 rtentry 112 43 0 3 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 790 0 786 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 166 0 165 9 8 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 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 403 0 393 1 0 1 1 0 8 0 shmpl 112 148 0 20 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 11707 0 10263 47 0 47 47 0 8 0 ffsino 240 11707 0 10263 87 2 85 86 0 8 0 nchpl 144 18242 0 16590 62 0 62 62 0 8 0 uvmvnodes 72 6602 0 0 121 0 121 121 0 8 0 vnodes 200 6602 0 0 348 0 348 348 0 8 0 namei 1024 51618 0 51618 3 2 1 1 0 8 1 scsiplug 64 7 0 7 5 5 0 1 0 8 0 scxspl 192 103236 0 103236 22 21 1 6 0 8 1 sigapl 432 5057 0 5043 2 0 2 2 0 8 0 futexpl 56 65025 0 65025 4 3 1 1 0 8 1 knotepl 112 724 0 697 7 6 1 2 0 8 0 kqueuepl 104 829 0 827 1 0 1 1 0 8 0 pipepl 112 2194 0 2173 4 3 1 2 0 8 0 fdescpl 424 5058 0 5043 2 0 2 2 0 8 0 filepl 120 25766 0 25661 6 2 4 5 0 8 0 lockfpl 104 1042 0 1042 12 11 1 1 0 8 1 lockfspl 32 1298 0 1298 12 11 1 1 0 8 1 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 64 0 54 1 0 1 1 0 8 0 ucredpl 96 5486 0 5479 1 0 1 1 0 8 0 zombiepl 144 5043 0 5043 2 1 1 1 0 8 1 processpl 840 5073 0 5043 4 0 4 4 0 8 0 procpl 600 11161 0 11120 4 0 4 4 0 8 0 sosppl 128 42 0 42 13 13 0 1 0 8 0 sockpl 384 3706 0 3685 10 7 3 4 0 8 0 mcl64k 65536 2065 0 2065 136 135 1 29 0 8 1 mcl16k 16384 11 0 11 8 8 0 1 0 8 0 mcl12k 12288 159 0 159 15 14 1 1 0 8 1 mcl9k 9216 49 0 49 17 16 1 1 0 8 1 mcl8k 8192 42 0 42 15 15 0 1 0 8 0 mcl4k 4096 144 0 144 13 12 1 1 0 8 1 mcl2k2 2112 21 0 21 11 11 0 1 0 8 0 mcl2k 2048 52309 0 52275 18 13 5 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 113165 0 113117 68 64 4 18 0 8 0 bufpl 256 16789 0 10185 413 0 413 413 0 8 0 anonpl 16 834137 0 824172 154 100 54 56 0 62 11 amapchunkpl 152 21037 0 20951 54 49 5 14 0 158 0 amappl16 192 47232 0 46688 168 131 37 38 0 8 9 amappl15 184 2572 0 2568 1 0 1 1 0 8 0 amappl14 176 27 0 23 1 0 1 1 0 8 0 amappl13 168 28 0 24 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 2747 0 2735 1 0 1 1 0 8 0 amappl10 144 4654 0 4650 2 1 1 1 0 8 0 amappl9 136 343 0 340 1 0 1 1 0 8 0 amappl8 128 162 0 129 2 0 2 2 0 8 0 amappl7 120 22 0 20 1 0 1 1 0 8 0 amappl6 112 50 0 45 1 0 1 1 0 8 0 amappl5 104 2743 0 2729 1 0 1 1 0 8 0 amappl4 96 296 0 270 2 1 1 2 0 8 0 amappl3 88 349 0 343 1 0 1 1 0 8 0 amappl2 80 49276 0 49216 2 0 2 2 0 8 0 amappl1 72 89695 0 89261 26 17 9 19 0 8 0 amappl 72 11533 0 11498 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 149 0 20 3 0 3 3 0 8 0 uaddrrnd 24 5058 0 5043 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 5058 0 5043 1 0 1 1 0 8 0 vmmpekpl 168 32607 0 32590 5 3 2 2 0 8 0 vmmpepl 168 611937 0 610351 171 97 74 79 0 357 5 vmsppl 264 5057 0 5043 2 1 1 2 0 8 0 pdppl 4096 10122 0 10086 5 0 5 5 0 8 0 pvpl 32 2707580 0 2694432 452 305 147 244 0 265 39 pmappl 192 5057 0 5043 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 785 0 253 17 0 17 17 0 8 0