panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *360629 14025 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 intel_init_audio(ffffffff80000000) at intel_init_audio wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001987400) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8030724178,80085761,ffff800014a2e920,f,fffffd803f7c68a0,ffff8000149da4d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361bc260,80085761,ffff800014a2e920,ffff8000149da4d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149da4d8,ffff800014a2ea68,ffff800014a2ea50) at sys_ioctl+0x638 syscall(ffff800014a2eb00) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,2d5f5445010) at Xsyscall+0x128 end of kernel end trace frame: 0x2d860c3dce0, 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 intel_init_audio(ffffffff80000000) at intel_init_audio wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001987400) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8030724178,80085761,ffff800014a2e920,f,fffffd803f7c68a0,ffff8000149da4d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361bc260,80085761,ffff800014a2e920,ffff8000149da4d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149da4d8,ffff800014a2ea68,ffff800014a2ea50) at sys_ioctl+0x638 syscall(ffff800014a2eb00) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,2d5f5445010) at Xsyscall+0x128 end of kernel end trace frame: 0x2d860c3dce0, count: -10 ddb> show registers rdi 0xffffffff81235867 db_enter+0x17 rsi 0x1935 __ALIGN_SIZE+0x935 rbp 0xffff800014a2e560 rbx 0xffff800014a2e610 rdx 0x1936 __ALIGN_SIZE+0x936 rcx 0xffff80000198a000 rax 0xffff80000198a000 r8 0xffff800014a2e520 r9 0x1 r10 0xffff800001988600 r11 0x4e6592e0f3b584f1 r12 0x3000000008 r13 0xffff800014a2e570 r14 0x100 r15 0x1 rip 0xffffffff81235868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a2e550 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=360629 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff8000149da730,0xffffffff8224c108 process=0xffff8000ffff6d30 user=0xffff800014a29000, vmspace=0xfffffd803f013108 estcpu=31, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 14025 108986 51081 0 2 0 syz-executor.0 *14025 360629 51081 0 7 0x4000000 syz-executor.0 76634 178208 19209 0 2 0 syz-executor.1 76634 196606 19209 0 3 0x4000080 lockf syz-executor.1 76634 378562 19209 0 3 0x4000080 lockf syz-executor.1 51081 383234 94498 0 3 0x82 nanosleep syz-executor.0 19209 101620 94498 0 3 0x82 nanosleep syz-executor.1 53887 464624 1 0 3 0x100083 ttyin getty 69682 468448 0 0 3 0x14200 bored sosplice 94498 358093 79714 0 3 0x82 thrsleep syz-fuzzer 94498 462897 79714 0 3 0x4000082 thrsleep syz-fuzzer 94498 222832 79714 0 3 0x4000082 thrsleep syz-fuzzer 94498 380404 79714 0 3 0x4000082 kqread syz-fuzzer 94498 467903 79714 0 3 0x4000082 thrsleep syz-fuzzer 94498 206551 79714 0 3 0x4000082 thrsleep syz-fuzzer 94498 373529 79714 0 3 0x4000082 thrsleep syz-fuzzer 94498 227815 79714 0 3 0x4000082 thrsleep syz-fuzzer 79714 504141 46326 0 3 0x10008a pause ksh 46326 173500 16638 0 3 0x92 select sshd 16638 89145 1 0 3 0x80 select sshd 62515 190202 17704 73 3 0x100090 kqread syslogd 17704 196293 1 0 3 0x100082 netio syslogd 67499 231122 1 77 3 0x100090 poll dhclient 1198 272780 1 0 3 0x80 poll dhclient 6418 509452 0 0 2 0x14200 zerothread 45063 348514 0 0 3 0x14200 aiodoned aiodoned 15368 392051 0 0 3 0x14200 syncer update 70503 252584 0 0 3 0x14200 cleaner cleaner 85558 15570 0 0 3 0x14200 reaper reaper 88251 346597 0 0 3 0x14200 pgdaemon pagedaemon 14322 322717 0 0 3 0x14200 bored crynlk 23729 396657 0 0 3 0x14200 bored crypto 37071 53200 0 0 3 0x40014200 acpi0 acpi0 66827 108460 0 0 3 0x14200 bored softnet 81589 220242 0 0 3 0x14200 bored systqmp 3202 259148 0 0 3 0x14200 bored systq 3893 153445 0 0 3 0x40014200 bored softclock 63855 144548 0 0 3 0x40014200 idle0 81918 65650 0 0 3 0x14200 bored smr 1 212410 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 9502 6374K 6379K 78643K 11001 0 0 pcb 23 9K 10K 78643K 707 0 0 rtable 103 4K 4K 78643K 668 0 0 ifaddr 57 13K 14K 78643K 235 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 37 0 0 iov 0 0K 24K 78643K 170 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 76K 78643K 1929 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 0K 78643K 174 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 1043 0 0 sigio 0 0K 0K 78643K 16 0 0 proc 41 30K 54K 78643K 507 0 0 subproc 64 65538K 69634K 78643K 354 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 147 0 0 in_multi 33 2K 2K 78643K 166 0 0 ether_multi 1 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 303 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 86 20K 22K 78643K 3448 0 0 UVM aobj 85 5K 5K 78643K 98 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 45 0 0 NDP 11 0K 0K 78643K 73 0 0 temp 163 2355K 2419K 78643K 6168 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 12 0 8 1 0 1 1 0 8 0 inpcbpl 280 521 0 514 1 0 1 1 0 8 0 plimitpl 152 61 0 54 1 0 1 1 0 8 0 rtentry 112 113 0 73 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 196 0 192 1 0 1 1 0 8 0 nd6 48 20 0 16 1 0 1 1 0 8 0 ppxss 1128 29 0 29 8 7 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 533 0 344 13 1 12 13 0 8 0 art_table 32 534 0 344 2 0 2 2 0 8 0 art_node 16 112 0 78 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 9 1 0 1 1 0 8 0 semapl 112 172 0 162 1 0 1 1 0 8 0 shmpl 112 96 0 13 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3336 0 1911 47 0 47 47 0 8 1 ffsino 240 3336 0 1911 84 0 84 84 0 8 0 nchpl 144 5016 0 3378 61 0 61 61 0 8 0 uvmvnodes 72 3616 0 0 66 0 66 66 0 8 0 vnodes 200 3616 0 0 191 0 191 191 0 8 0 namei 1024 15228 0 15228 3 2 1 1 0 8 1 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 19863 0 19863 20 17 3 6 0 8 3 sigapl 432 1189 0 1175 2 0 2 2 0 8 0 futexpl 56 17601 0 17601 3 2 1 1 0 8 1 knotepl 112 439 0 412 4 2 2 2 0 8 1 kqueuepl 104 317 0 315 1 0 1 1 0 8 0 pipepl 112 846 0 827 5 4 1 2 0 8 0 fdescpl 424 1190 0 1175 2 0 2 2 0 8 0 filepl 120 7877 0 7778 6 2 4 4 0 8 1 lockfpl 104 465 0 462 5 4 1 1 0 8 0 lockfspl 32 419 0 418 5 4 1 1 0 8 0 sessionpl 112 27 0 17 1 0 1 1 0 8 0 pgrppl 48 35 0 25 1 0 1 1 0 8 0 ucredpl 96 1922 0 1915 1 0 1 1 0 8 0 zombiepl 144 1175 0 1175 2 1 1 1 0 8 1 processpl 840 1205 0 1175 4 0 4 4 0 8 0 procpl 600 2652 0 2612 6 2 4 4 0 8 0 sosppl 128 20 0 20 5 4 1 1 0 8 1 sockpl 384 1127 0 1110 6 3 3 3 0 8 1 mcl64k 65536 506 0 506 62 61 1 29 0 8 1 mcl16k 16384 5 0 5 3 3 0 1 0 8 0 mcl12k 12288 26 0 26 8 7 1 1 0 8 1 mcl9k 9216 13 0 13 6 5 1 1 0 8 1 mcl8k 8192 20 0 20 9 9 0 1 0 8 0 mcl4k 4096 66 0 66 9 8 1 1 0 8 1 mcl2k2 2112 10 0 10 7 6 1 1 0 8 1 mcl2k 2048 47530 0 47495 13 8 5 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 84007 0 83928 40 32 8 21 0 8 0 bufpl 256 9742 0 4208 346 0 346 346 0 8 0 anonpl 16 140238 0 132573 99 59 40 55 0 62 1 amapchunkpl 152 5682 0 5590 20 15 5 15 0 158 0 amappl16 192 6611 0 6120 75 49 26 37 0 8 0 amappl15 184 131 0 130 1 0 1 1 0 8 0 amappl14 176 145 0 138 1 0 1 1 0 8 0 amappl13 168 56 0 53 1 0 1 1 0 8 0 amappl12 160 422 0 421 3 2 1 1 0 8 0 amappl11 152 365 0 354 1 0 1 1 0 8 0 amappl10 144 434 0 433 2 1 1 1 0 8 0 amappl9 136 450 0 444 1 0 1 1 0 8 0 amappl8 128 692 0 677 1 0 1 1 0 8 0 amappl7 120 46 0 42 1 0 1 1 0 8 0 amappl6 112 56 0 50 1 0 1 1 0 8 0 amappl5 104 282 0 271 1 0 1 1 0 8 0 amappl4 96 328 0 303 2 1 1 2 0 8 0 amappl3 88 234 0 227 1 0 1 1 0 8 0 amappl2 80 10492 0 10428 2 0 2 2 0 8 0 amappl1 72 31102 0 30684 24 15 9 19 0 8 0 amappl 72 2930 0 2894 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 97 0 13 2 0 2 2 0 8 0 uaddrrnd 24 1190 0 1175 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1190 0 1175 1 0 1 1 0 8 0 vmmpekpl 168 12416 0 12395 2 0 2 2 0 8 0 vmmpepl 168 132211 0 130712 146 67 79 83 0 357 11 vmsppl 264 1189 0 1175 3 2 1 2 0 8 0 pdppl 4096 2386 0 2350 6 1 5 6 0 8 0 pvpl 32 433069 0 422219 327 122 205 241 0 265 104 pmappl 192 1189 0 1175 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 595 0 127 14 0 14 14 0 8 0