panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *367619 35956 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 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,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80315675d0,80085761,ffff800014a07d70,42,fffffd803f7c6b40,ffff8000ffff2270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8030855108,80085761,ffff800014a07d70,ffff8000ffff2270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2270,ffff800014a07eb8,ffff800014a07ea0) at sys_ioctl+0x638 syscall(ffff800014a07f50) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ab5bf0f3010) at Xsyscall+0x128 end of kernel end trace frame: 0xab8265401d0, 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,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80315675d0,80085761,ffff800014a07d70,42,fffffd803f7c6b40,ffff8000ffff2270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8030855108,80085761,ffff800014a07d70,ffff8000ffff2270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2270,ffff800014a07eb8,ffff800014a07ea0) at sys_ioctl+0x638 syscall(ffff800014a07f50) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ab5bf0f3010) at Xsyscall+0x128 end of kernel end trace frame: 0xab8265401d0, count: -10 ddb> show registers rdi 0xffffffff81235867 db_enter+0x17 rsi 0x17f1 __ALIGN_SIZE+0x7f1 rbp 0xffff800014a079b0 rbx 0xffff800014a07a60 rdx 0x17f2 __ALIGN_SIZE+0x7f2 rcx 0xffff800002b3c000 rax 0xffff800002b3c000 r8 0xffff800014a07970 r9 0x1 r10 0xffff800001943780 r11 0xbd89b44bfcd121ab r12 0x3000000008 r13 0xffff800014a079c0 r14 0x100 r15 0x1 rip 0xffffffff81235868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a079a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=367619 stat=onproc flags process=0 proc=4000000 pri=63, usrpri=63, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff39e0,0xffffffff8224c108 process=0xffff8000ffff73c0 user=0xffff800014a03000, vmspace=0xfffffd803f013d68 estcpu=27, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 35956 279258 64898 0 2 0 syz-executor.1 *35956 367619 64898 0 7 0x4000000 syz-executor.1 23333 436185 76207 0 3 0 vmmaplk syz-executor.0 23333 223032 76207 0 3 0x4000000 vmmaplk syz-executor.0 23333 172343 76207 0 2 0x4000000 syz-executor.0 23333 348770 76207 0 3 0x4000000 vmmaplk syz-executor.0 64898 362575 12370 0 3 0x82 nanosleep syz-executor.1 76207 160063 12370 0 3 0x82 nanosleep syz-executor.0 12370 138026 11404 0 3 0x82 thrsleep syz-fuzzer 12370 436466 11404 0 3 0x4000082 thrsleep syz-fuzzer 12370 350850 11404 0 3 0x4000082 thrsleep syz-fuzzer 12370 387112 11404 0 3 0x4000082 thrsleep syz-fuzzer 12370 49399 11404 0 3 0x4000082 thrsleep syz-fuzzer 12370 381881 11404 0 3 0x4000082 kqread syz-fuzzer 12370 209397 11404 0 3 0x4000082 thrsleep syz-fuzzer 11404 485314 2957 0 3 0x10008a pause ksh 2957 342169 6913 0 3 0x92 select sshd 379 53942 1 0 3 0x100083 ttyin getty 6913 195616 1 0 3 0x80 select sshd 77388 477592 55439 73 3 0x100090 kqread syslogd 55439 471092 1 0 3 0x100082 netio syslogd 2640 472495 1 77 3 0x100090 poll dhclient 17996 428672 1 0 3 0x80 poll dhclient 23081 493792 0 0 2 0x14200 zerothread 26490 6020 0 0 3 0x14200 aiodoned aiodoned 93156 249703 0 0 3 0x14200 syncer update 59964 156214 0 0 3 0x14200 cleaner cleaner 58608 356746 0 0 3 0x14200 reaper reaper 80017 24124 0 0 3 0x14200 pgdaemon pagedaemon 34701 104680 0 0 3 0x14200 bored crynlk 40136 90045 0 0 3 0x14200 bored crypto 9470 43389 0 0 3 0x40014200 acpi0 acpi0 58349 286919 0 0 3 0x14200 bored softnet 80102 514896 0 0 3 0x14200 bored systqmp 87456 457960 0 0 3 0x14200 bored systq 3888 522746 0 0 3 0x40014200 bored softclock 66243 272988 0 0 3 0x40014200 idle0 85587 258272 0 0 3 0x14200 bored smr 1 39320 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 9446 6313K 6319K 78643K 10563 0 0 pcb 25 9K 10K 78643K 107 0 0 rtable 100 3K 3K 78643K 220 0 0 ifaddr 35 10K 10K 78643K 54 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 16 0 0 iov 0 0K 12K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 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 1K 78643K 2 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 6 0K 0K 78643K 8 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 76 0 0 proc 41 30K 54K 78643K 281 0 0 subproc 64 65538K 67586K 78643K 102 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 2 0 0 in_multi 33 2K 2K 78643K 44 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 177 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 83 20K 20K 78643K 934 0 0 UVM aobj 6 2K 2K 78643K 6 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 2 0 0 NDP 7 0K 0K 78643K 15 0 0 temp 83 2341K 2405K 78643K 3010 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 56 0 49 1 0 1 1 0 8 0 plimitpl 152 17 0 10 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 8 0 8 1 1 0 1 0 8 0 tcpcb 544 20 0 16 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 3 0 3 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 227 0 41 12 0 12 12 0 8 0 art_table 32 228 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 semupl 112 1 0 1 1 0 1 1 0 8 1 semapl 112 4 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1532 0 121 46 0 46 46 0 8 0 ffsino 240 1532 0 121 84 0 84 84 0 8 0 nchpl 144 1845 0 216 61 0 61 61 0 8 0 uvmvnodes 72 1592 0 0 29 0 29 29 0 8 0 vnodes 200 1592 0 0 84 0 84 84 0 8 0 namei 1024 4527 0 4527 1 0 1 1 0 8 1 scxspl 192 4664 0 4664 8 1 7 7 0 8 7 sigapl 432 241 0 227 2 0 2 2 0 8 0 futexpl 56 972 0 972 1 0 1 1 0 8 1 knotepl 112 91 0 64 2 0 2 2 0 8 0 kqueuepl 104 22 0 20 1 0 1 1 0 8 0 pipepl 112 162 0 143 1 0 1 1 0 8 0 fdescpl 424 242 0 227 2 0 2 2 0 8 0 filepl 120 1312 0 1211 4 0 4 4 0 8 0 lockfpl 104 26 0 25 2 1 1 1 0 8 0 lockfspl 32 12 0 11 2 1 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 164 0 157 1 0 1 1 0 8 0 zombiepl 144 227 0 227 1 0 1 1 0 8 1 processpl 840 256 0 227 4 0 4 4 0 8 0 procpl 600 341 0 302 4 0 4 4 0 8 0 sockpl 384 138 0 119 3 0 3 3 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 12 0 12 2 1 1 1 0 8 1 mcl2k2 2112 2 0 2 1 0 1 1 0 8 1 mcl2k 2048 45695 0 45655 13 3 10 11 0 8 4 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 75112 0 75045 9 2 7 7 0 8 0 bufpl 256 5523 0 1232 269 0 269 269 0 8 0 anonpl 16 35751 0 27988 51 2 49 49 0 62 15 amapchunkpl 152 981 0 871 6 0 6 6 0 158 0 amappl16 192 1041 0 584 32 2 30 32 0 8 7 amappl15 184 2 0 1 1 0 1 1 0 8 0 amappl14 176 30 0 24 1 0 1 1 0 8 0 amappl13 168 47 0 42 1 0 1 1 0 8 0 amappl12 160 9 0 7 1 0 1 1 0 8 0 amappl11 152 217 0 205 1 0 1 1 0 8 0 amappl10 144 63 0 61 1 0 1 1 0 8 0 amappl9 136 372 0 368 1 0 1 1 0 8 0 amappl8 128 123 0 109 1 0 1 1 0 8 0 amappl7 120 41 0 37 1 0 1 1 0 8 0 amappl6 112 51 0 45 1 0 1 1 0 8 0 amappl5 104 151 0 138 1 0 1 1 0 8 0 amappl4 96 266 0 243 2 1 1 2 0 8 0 amappl3 88 127 0 119 1 0 1 1 0 8 0 amappl2 80 1144 0 1085 2 0 2 2 0 8 0 amappl1 72 13295 0 12865 25 14 11 19 0 8 2 amappl 72 561 0 520 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 242 0 227 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 242 0 227 1 0 1 1 0 8 0 vmmpekpl 168 5813 0 5794 2 0 2 2 0 8 0 vmmpepl 168 32970 0 31496 93 6 87 87 0 357 22 vmsppl 264 241 0 227 2 0 2 2 0 8 1 pdppl 4096 490 0 454 6 0 6 6 0 8 1 pvpl 32 124233 0 113432 123 0 123 123 0 265 31 pmappl 192 241 0 227 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 404 0 8 12 0 12 12 0 8 0