panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *252710 85606 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,ffff800001990700) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802e0bc118,80085761,ffff8000149ea560,f,fffffd803f7c69c0,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f9fea60,80085761,ffff8000149ea560,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149ea6a8,ffff8000149ea690) at sys_ioctl+0x638 syscall(ffff8000149ea740) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,25c77d23010) at Xsyscall+0x128 end of kernel end trace frame: 0x25f41289400, 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,ffff800001990700) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802e0bc118,80085761,ffff8000149ea560,f,fffffd803f7c69c0,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f9fea60,80085761,ffff8000149ea560,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149ea6a8,ffff8000149ea690) at sys_ioctl+0x638 syscall(ffff8000149ea740) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,25c77d23010) at Xsyscall+0x128 end of kernel end trace frame: 0x25f41289400, count: -10 ddb> show registers rdi 0xffffffff81da7667 db_enter+0x17 rsi 0x17df __ALIGN_SIZE+0x7df rbp 0xffff8000149ea1a0 rbx 0xffff8000149ea250 rdx 0x17e0 __ALIGN_SIZE+0x7e0 rcx 0xffff800001993000 rax 0xffff800001993000 r8 0xffff8000149ea160 r9 0x1 r10 0xffff800001991b80 r11 0xfb6b265caadcb535 r12 0x3000000008 r13 0xffff8000149ea1b0 r14 0x100 r15 0x1 rip 0xffffffff81da7668 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149ea190 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=252710 stat=onproc flags process=0 proc=4000000 pri=79, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3080,0xffffffff8224b7e0 process=0xffff8000ffff7078 user=0xffff8000149e5000, vmspace=0xfffffd803f014210 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 85606 283406 85549 0 2 0 syz-executor.1 *85606 252710 85549 0 7 0x4000000 syz-executor.1 20567 469497 45388 0 2 0x2 syz-executor.0 85549 337382 45388 0 3 0x82 nanosleep syz-executor.1 69930 517550 1 0 3 0x100083 ttyin getty 86919 6691 0 0 3 0x14200 bored sosplice 45388 28408 50437 0 3 0x82 thrsleep syz-fuzzer 45388 523762 50437 0 3 0x4000082 nanosleep syz-fuzzer 45388 180673 50437 0 3 0x4000082 thrsleep syz-fuzzer 45388 38464 50437 0 3 0x4000082 thrsleep syz-fuzzer 45388 206659 50437 0 3 0x4000082 thrsleep syz-fuzzer 45388 344137 50437 0 3 0x4000082 thrsleep syz-fuzzer 45388 232196 50437 0 3 0x4000082 thrsleep syz-fuzzer 45388 171272 50437 0 3 0x4000082 kqread syz-fuzzer 50437 26522 46985 0 3 0x10008a pause ksh 46985 268992 86299 0 3 0x92 select sshd 86299 353089 1 0 3 0x80 select sshd 69636 64515 14357 73 3 0x100090 kqread syslogd 14357 54522 1 0 3 0x100082 netio syslogd 21128 174087 1 77 3 0x100090 poll dhclient 39181 132445 1 0 3 0x80 poll dhclient 90804 238299 0 0 2 0x14200 zerothread 69335 181370 0 0 3 0x14200 aiodoned aiodoned 86101 326909 0 0 3 0x14200 syncer update 46082 165917 0 0 3 0x14200 cleaner cleaner 93948 487104 0 0 3 0x14200 reaper reaper 34531 7296 0 0 3 0x14200 pgdaemon pagedaemon 78048 180510 0 0 3 0x14200 bored crynlk 62197 105361 0 0 3 0x14200 bored crypto 41955 151376 0 0 3 0x40014200 acpi0 acpi0 41508 499336 0 0 3 0x14200 bored softnet 57638 368201 0 0 3 0x14200 bored systqmp 20503 244241 0 0 3 0x14200 bored systq 49410 461814 0 0 3 0x40014200 bored softclock 1562 289707 0 0 3 0x40014200 idle0 80253 52923 0 0 3 0x14200 bored smr 1 28394 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 9567 6377K 6385K 78643K 11887 0 0 pcb 23 9K 11K 78643K 2063 0 0 rtable 100 3K 3K 78643K 1461 0 0 ifaddr 77 18K 20K 78643K 583 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 83 0 0 iov 0 0K 28K 78643K 593 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 75K 76K 78643K 2920 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 69 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 527 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 3501 0 0 sigio 0 0K 0K 78643K 48 0 0 proc 42 30K 62K 78643K 1156 0 0 subproc 64 65538K 67586K 78643K 724 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 498 0 0 in_multi 33 2K 2K 78643K 397 0 0 ether_multi 1 0K 0K 78643K 26 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 114 503K 503K 78643K 114 0 0 exec 0 0K 1K 78643K 638 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 95 21K 25K 78643K 9050 0 0 UVM aobj 130 6K 6K 78643K 146 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 156 0 0 NDP 18 0K 0K 78643K 183 0 0 temp 212 2360K 2432K 78643K 13312 0 0 kqueue 0 0K 0K 78643K 35 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 22 0 18 1 0 1 1 0 8 0 inpcbpl 280 1842 0 1835 1 0 1 1 0 8 0 plimitpl 152 128 0 121 1 0 1 1 0 8 0 rtentry 112 203 0 163 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 23 0 23 2 2 0 1 0 8 0 tcpcb 544 665 0 661 1 0 1 1 0 8 0 nd6 48 40 0 36 1 0 1 1 0 8 0 swfcl 56 1 0 0 1 0 1 1 0 8 0 ppxss 1128 77 0 77 16 15 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 959 0 769 12 0 12 12 0 8 0 art_table 32 960 0 769 2 0 2 2 0 8 0 art_node 16 202 0 168 1 0 1 1 0 8 0 sysvmsgpl 40 15 0 9 1 0 1 1 0 8 0 semapl 112 525 0 515 1 0 1 1 0 8 0 shmpl 112 144 0 16 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7384 0 5867 49 0 49 49 0 8 0 ffsino 240 7384 0 5867 90 0 90 90 0 8 0 nchpl 144 12582 0 10907 63 0 63 63 0 8 0 uvmvnodes 72 6657 0 0 122 0 122 122 0 8 0 vnodes 200 6657 0 0 351 0 351 351 0 8 0 namei 1024 40593 0 40592 3 2 1 1 0 8 0 scsiplug 64 9 0 9 8 8 0 1 0 8 0 scxspl 192 57992 0 57992 22 20 2 6 0 8 2 sigapl 432 3619 0 3606 2 0 2 2 0 8 0 futexpl 56 58748 0 58748 3 2 1 1 0 8 1 knotepl 112 1062 0 1035 7 6 1 2 0 8 0 kqueuepl 104 948 0 946 1 0 1 1 0 8 0 pipepl 112 2396 0 2377 8 7 1 2 0 8 0 fdescpl 424 3620 0 3606 2 0 2 2 0 8 0 filepl 120 23889 0 23794 9 5 4 5 0 8 1 lockfpl 104 1077 0 1077 4 3 1 1 0 8 1 lockfspl 32 772 0 772 4 3 1 1 0 8 1 sessionpl 112 39 0 29 1 0 1 1 0 8 0 pgrppl 48 65 0 55 1 0 1 1 0 8 0 ucredpl 96 5067 0 5060 1 0 1 1 0 8 0 zombiepl 144 3606 0 3606 2 1 1 1 0 8 1 processpl 840 3635 0 3606 4 0 4 4 0 8 0 procpl 600 7906 0 7869 4 0 4 4 0 8 0 sosppl 128 32 0 32 12 12 0 1 0 8 0 sockpl 384 3669 0 3652 10 7 3 4 0 8 1 mcl64k 65536 2656 0 2656 195 186 9 64 0 8 9 mcl16k 16384 9 0 9 9 9 0 1 0 8 0 mcl12k 12288 79 0 79 18 17 1 1 0 8 1 mcl9k 9216 56 0 56 16 15 1 1 0 8 1 mcl8k 8192 69 0 69 20 19 1 1 0 8 1 mcl4k 4096 207 0 207 11 10 1 1 0 8 1 mcl2k2 2112 26 0 26 11 11 0 1 0 8 0 mcl2k 2048 51742 0 51701 15 9 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 111910 0 111842 152 144 8 43 0 8 2 bufpl 256 18035 0 11321 420 0 420 420 0 8 0 anonpl 16 460308 0 452600 134 84 50 54 0 62 6 amapchunkpl 152 15867 0 15788 50 42 8 14 0 158 3 amappl16 192 24401 0 23919 223 190 33 38 0 8 8 amappl15 184 1204 0 1201 1 0 1 1 0 8 0 amappl14 176 1015 0 1012 1 0 1 1 0 8 0 amappl13 168 573 0 568 1 0 1 1 0 8 0 amappl12 160 248 0 248 3 3 0 1 0 8 0 amappl11 152 1767 0 1758 1 0 1 1 0 8 0 amappl10 144 68 0 66 2 1 1 1 0 8 0 amappl9 136 1301 0 1298 1 0 1 1 0 8 0 amappl8 128 325 0 297 1 0 1 1 0 8 0 amappl7 120 711 0 705 1 0 1 1 0 8 0 amappl6 112 1035 0 1027 1 0 1 1 0 8 0 amappl5 104 861 0 849 1 0 1 1 0 8 0 amappl4 96 347 0 324 1 0 1 1 0 8 0 amappl3 88 329 0 324 1 0 1 1 0 8 0 amappl2 80 33585 0 33535 2 0 2 2 0 8 0 amappl1 72 72863 0 72453 24 14 10 19 0 8 0 amappl 72 8290 0 8259 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 145 0 16 3 0 3 3 0 8 0 uaddrrnd 24 3620 0 3606 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3620 0 3606 1 0 1 1 0 8 0 vmmpekpl 168 27954 0 27934 2 0 2 2 0 8 0 vmmpepl 168 396163 0 394752 206 127 79 94 0 357 7 vmsppl 264 3619 0 3606 5 4 1 2 0 8 0 pdppl 4096 7246 0 7212 6 1 5 6 0 8 0 pvpl 32 1341459 0 1330653 378 247 131 238 0 265 25 pmappl 192 3619 0 3606 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 940 0 382 19 1 18 18 0 8 0