panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *187206 59077 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 filt_pppx_rdetach(ffffffff80000000) at filt_pppx_rdetach wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001944800) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8032199bf0,80085761,ffff8000149fc370,f,fffffd803f7c6480,ffff8000ffff99d0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fa28010,80085761,ffff8000149fc370,ffff8000ffff99d0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff99d0,ffff8000149fc4b8,ffff8000149fc4a0) at sys_ioctl+0x638 syscall(ffff8000149fc550) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e58cf7d2010) at Xsyscall+0x128 end of kernel end trace frame: 0xe5b6259f060, 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 filt_pppx_rdetach(ffffffff80000000) at filt_pppx_rdetach wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001944800) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8032199bf0,80085761,ffff8000149fc370,f,fffffd803f7c6480,ffff8000ffff99d0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fa28010,80085761,ffff8000149fc370,ffff8000ffff99d0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff99d0,ffff8000149fc4b8,ffff8000149fc4a0) at sys_ioctl+0x638 syscall(ffff8000149fc550) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e58cf7d2010) at Xsyscall+0x128 end of kernel end trace frame: 0xe5b6259f060, count: -10 ddb> show registers rdi 0xffffffff81da7667 db_enter+0x17 rsi 0x18d2 __ALIGN_SIZE+0x8d2 rbp 0xffff8000149fbfb0 rbx 0xffff8000149fc060 rdx 0x18d3 __ALIGN_SIZE+0x8d3 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff8000149fbf70 r9 0x1 r10 0xffff8000009369c0 r11 0x5c4760ee296e57cd r12 0x3000000008 r13 0xffff8000149fbfc0 r14 0x100 r15 0x1 rip 0xffffffff81da7668 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149fbfa0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=187206 stat=onproc flags process=0 proc=4000000 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8008,0xffff8000ffff8720 process=0xffff8000ffff6010 user=0xffff8000149f7000, vmspace=0xfffffd803f014318 estcpu=0, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 96671 414525 39152 0 2 0 syz-executor.0 59077 219693 81595 0 2 0 syz-executor.1 *59077 187206 81595 0 7 0x4000000 syz-executor.1 39152 382676 49435 0 3 0x82 nanosleep syz-executor.0 81595 153485 49435 0 3 0x82 nanosleep syz-executor.1 49435 437617 11582 0 3 0x82 thrsleep syz-fuzzer 49435 52905 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 277711 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 326011 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 419962 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 431197 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 463012 11582 0 3 0x4000082 thrsleep syz-fuzzer 49435 34123 11582 0 3 0x4000082 kqread syz-fuzzer 11582 126600 38985 0 3 0x10008a pause ksh 38985 421475 45328 0 3 0x92 select sshd 69247 488297 1 0 3 0x100083 ttyin getty 45328 186585 1 0 3 0x80 select sshd 69157 195067 14124 73 3 0x100090 kqread syslogd 14124 212195 1 0 3 0x100082 netio syslogd 39364 415687 1 77 3 0x100090 poll dhclient 10088 388235 1 0 3 0x80 poll dhclient 2523 501453 0 0 2 0x14200 zerothread 54133 384633 0 0 3 0x14200 aiodoned aiodoned 61773 100346 0 0 3 0x14200 syncer update 76704 435921 0 0 3 0x14200 cleaner cleaner 87960 256235 0 0 3 0x14200 reaper reaper 63639 15338 0 0 3 0x14200 pgdaemon pagedaemon 85391 336502 0 0 3 0x14200 bored crynlk 4977 236383 0 0 3 0x14200 bored crypto 29578 233799 0 0 3 0x40014200 acpi0 acpi0 38862 367101 0 0 3 0x14200 bored softnet 15743 256495 0 0 3 0x14200 bored systqmp 76445 101156 0 0 3 0x14200 bored systq 11942 25270 0 0 3 0x40014200 bored softclock 17716 257657 0 0 3 0x40014200 idle0 65250 30057 0 0 3 0x14200 bored smr 1 406412 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 9442 6319K 6319K 78643K 10544 0 0 pcb 23 9K 9K 78643K 61 0 0 rtable 97 2K 2K 78643K 167 0 0 ifaddr 34 9K 9K 78643K 34 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 8K 78643K 4 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1222 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 10 0K 0K 78643K 10 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 40 0 0 proc 40 30K 46K 78643K 251 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 7 0 0 in_multi 33 2K 2K 78643K 39 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 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 165 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 75 20K 20K 78643K 823 0 0 UVM aobj 4 2K 2K 78643K 4 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 5 0K 0K 78643K 9 0 0 temp 79 2344K 2408K 78643K 2839 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 44 0 37 1 0 1 1 0 8 0 plimitpl 152 14 0 7 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 tcpcb 544 22 0 18 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 186 0 0 12 0 12 12 0 8 0 art_table 32 187 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1473 0 68 46 0 46 46 0 8 0 ffsino 240 1473 0 68 83 0 83 83 0 8 0 nchpl 144 1726 0 104 61 0 61 61 0 8 0 uvmvnodes 72 1518 0 0 28 0 28 28 0 8 0 vnodes 200 1518 0 0 80 0 80 80 0 8 0 namei 1024 4161 0 4161 2 1 1 1 0 8 1 scxspl 192 4072 0 4072 7 3 4 6 0 8 4 sigapl 432 208 0 194 2 0 2 2 0 8 0 futexpl 56 473 0 473 1 0 1 1 0 8 1 knotepl 112 67 0 40 2 0 2 2 0 8 1 kqueuepl 104 4 0 2 1 0 1 1 0 8 0 pipepl 112 138 0 119 2 1 1 1 0 8 0 fdescpl 424 209 0 194 2 0 2 2 0 8 0 filepl 120 1078 0 983 4 0 4 4 0 8 1 lockfpl 104 8 0 8 2 1 1 1 0 8 1 lockfspl 32 4 0 4 2 1 1 1 0 8 1 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 19 0 9 1 0 1 1 0 8 0 ucredpl 96 118 0 111 1 0 1 1 0 8 0 zombiepl 144 194 0 194 2 1 1 1 0 8 1 processpl 840 223 0 194 4 0 4 4 0 8 0 procpl 600 257 0 220 4 0 4 4 0 8 1 sockpl 384 88 0 71 3 0 3 3 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 1 0 1 1 0 1 1 0 8 1 mcl4k 4096 9 0 9 2 1 1 1 0 8 1 mcl2k 2048 46202 0 46167 12 2 10 10 0 8 5 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 75432 0 75349 8 2 6 6 0 8 0 bufpl 256 5295 0 1069 265 0 265 265 0 8 0 anonpl 16 28093 0 19830 36 2 34 34 0 62 0 amapchunkpl 152 802 0 722 5 0 5 5 0 158 1 amappl16 192 600 0 160 23 0 23 23 0 8 0 amappl15 184 13 0 10 1 0 1 1 0 8 0 amappl14 176 39 0 33 1 0 1 1 0 8 0 amappl13 168 23 0 20 1 0 1 1 0 8 0 amappl12 160 8 0 8 1 1 0 1 0 8 0 amappl11 152 189 0 179 1 0 1 1 0 8 0 amappl10 144 54 0 53 2 1 1 1 0 8 0 amappl9 136 352 0 348 1 0 1 1 0 8 0 amappl8 128 114 0 100 1 0 1 1 0 8 0 amappl7 120 21 0 19 1 0 1 1 0 8 0 amappl6 112 61 0 55 1 0 1 1 0 8 0 amappl5 104 136 0 124 1 0 1 1 0 8 0 amappl4 96 266 0 243 2 1 1 2 0 8 0 amappl3 88 126 0 118 1 0 1 1 0 8 0 amappl2 80 844 0 794 2 0 2 2 0 8 0 amappl1 72 12660 0 12252 25 10 15 19 0 8 5 amappl 72 467 0 435 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 209 0 194 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 209 0 194 1 0 1 1 0 8 0 vmmpekpl 168 5574 0 5558 1 0 1 1 0 8 0 vmmpepl 168 29033 0 27639 87 14 73 73 0 357 12 vmsppl 264 208 0 194 2 0 2 2 0 8 1 pdppl 4096 424 0 388 5 0 5 5 0 8 0 pvpl 32 107806 0 96578 100 5 95 97 0 265 3 pmappl 192 208 0 194 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 397 0 8 12 0 12 12 0 8 0