panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 16761 28040 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 pf_hash(ffffffff80000000,8,2,2) at pf_hash 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(fffffd802eeb5cb8,80085761,ffff8000149dfeb0,42,fffffd803f7c6b40,ffff8000ffff24c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803a566ea0,80085761,ffff8000149dfeb0,ffff8000ffff24c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff24c8,ffff8000149dfff8,ffff8000149dffe0) at sys_ioctl+0x638 syscall(ffff8000149e0090) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,6bf95dc3010) at Xsyscall+0x128 end of kernel end trace frame: 0x6c1ee0371c0, 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 pf_hash(ffffffff80000000,8,2,2) at pf_hash 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(fffffd802eeb5cb8,80085761,ffff8000149dfeb0,42,fffffd803f7c6b40,ffff8000ffff24c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803a566ea0,80085761,ffff8000149dfeb0,ffff8000ffff24c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff24c8,ffff8000149dfff8,ffff8000149dffe0) at sys_ioctl+0x638 syscall(ffff8000149e0090) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,6bf95dc3010) at Xsyscall+0x128 end of kernel end trace frame: 0x6c1ee0371c0, count: -10 ddb> show registers rdi 0xffffffff819e3aa7 db_enter+0x17 rsi 0x1bfc __ALIGN_SIZE+0xbfc rbp 0xffff8000149dfaf0 rbx 0xffff8000149dfba0 rdx 0x1bfd __ALIGN_SIZE+0xbfd rcx 0xffff80000433d000 rax 0xffff80000433d000 r8 0xffff8000149dfab0 r9 0x1 r10 0xffff80000193a580 r11 0x5842bafc9b9c8c04 r12 0x3000000008 r13 0xffff8000149dfb00 r14 0x100 r15 0x1 rip 0xffffffff819e3aa8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149dfae0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=16761 stat=onproc flags process=0 proc=4000000 pri=79, usrpri=79, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2978,0xffffffff822cc900 process=0xffff8000ffff6d30 user=0xffff8000149db000, vmspace=0xfffffd803f014e70 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 28040 133544 85467 0 2 0 syz-executor.0 *28040 16761 85467 0 7 0x4000000 syz-executor.0 85467 79652 35216 0 2 0x482 syz-executor.0 18454 149535 35216 0 2 0x2 syz-executor.1 15414 273702 0 0 3 0x14200 bored sosplice 35216 257750 65883 0 3 0x82 thrsleep syz-fuzzer 35216 452273 65883 0 3 0x4000082 nanosleep syz-fuzzer 35216 423365 65883 0 3 0x4000082 thrsleep syz-fuzzer 35216 464821 65883 0 3 0x4000082 thrsleep syz-fuzzer 35216 328874 65883 0 3 0x4000082 thrsleep syz-fuzzer 35216 65695 65883 0 3 0x4000082 thrsleep syz-fuzzer 35216 130220 65883 0 3 0x4000082 thrsleep syz-fuzzer 35216 414342 65883 0 3 0x4000082 kqread syz-fuzzer 35216 197812 65883 0 3 0x4000082 thrsleep syz-fuzzer 65883 118060 33629 0 3 0x10008a pause ksh 33629 440758 99912 0 3 0x92 select sshd 43015 262575 1 0 3 0x100083 ttyin getty 99912 445824 1 0 3 0x80 select sshd 56286 455423 36529 73 3 0x100090 kqread syslogd 36529 395438 1 0 3 0x100082 netio syslogd 76587 108530 1 77 3 0x100090 poll dhclient 37121 313444 1 0 3 0x80 poll dhclient 93927 190212 0 0 2 0x14200 zerothread 14002 250666 0 0 3 0x14200 aiodoned aiodoned 28468 15252 0 0 3 0x14200 syncer update 10189 172676 0 0 3 0x14200 cleaner cleaner 23198 255460 0 0 3 0x14200 reaper reaper 68404 485983 0 0 3 0x14200 pgdaemon pagedaemon 7385 229238 0 0 3 0x14200 bored crynlk 29568 385946 0 0 3 0x14200 bored crypto 85481 334618 0 0 3 0x40014200 acpi0 acpi0 39732 228883 0 0 3 0x14200 bored softnet 59590 2775 0 0 3 0x14200 bored systqmp 67865 336217 0 0 3 0x14200 bored systq 12407 220908 0 0 3 0x40014200 bored softclock 8703 514203 0 0 3 0x40014200 idle0 66432 292932 0 0 3 0x14200 bored smr 1 176493 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 9489 6343K 6356K 78643K 14280 0 0 pcb 23 9K 10K 78643K 503 0 0 rtable 100 3K 3K 78643K 3728 0 0 ifaddr 51 23K 31K 78643K 1795 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 24K 78643K 107 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 76K 78643K 2290 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 13 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 786 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 1316 0 0 sigio 0 0K 0K 78643K 7 0 0 proc 42 30K 46K 78643K 450 0 0 subproc 64 65538K 67586K 78643K 242 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 104 0 0 in_multi 33 2K 2K 78643K 106 0 0 ether_multi 1 0K 0K 78643K 4 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 264 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 85 21K 21K 78643K 3666 0 0 UVM aobj 55 3K 3K 78643K 61 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 32 0 0 NDP 10 0K 0K 78643K 593 0 0 temp 146 2352K 2416K 78643K 10131 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 9 0 5 1 0 1 1 0 8 0 inpcbpl 280 1103 0 1096 1 0 1 1 0 8 0 plimitpl 152 45 0 38 1 0 1 1 0 8 0 rtentry 112 86 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 13 0 13 1 1 0 1 0 8 0 tcpcb 544 160 0 156 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 ppxss 1128 17 0 17 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 411 0 217 13 0 13 13 0 8 0 art_table 32 412 0 217 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 1 1 0 1 1 0 8 0 semupl 112 6 0 6 2 2 0 1 0 8 0 semapl 112 784 0 774 1 0 1 1 0 8 0 shmpl 112 59 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4468 0 3038 47 0 47 47 0 8 0 ffsino 240 4468 0 3038 85 0 85 85 0 8 0 nchpl 144 6288 0 4646 62 0 62 62 0 8 1 uvmvnodes 72 4695 0 0 86 0 86 86 0 8 0 vnodes 200 4695 0 0 248 0 248 248 0 8 0 namei 1024 18538 0 18537 2 1 1 1 0 8 0 scxspl 192 16388 0 16388 10 9 1 7 0 8 1 sigapl 432 1469 0 1456 2 0 2 2 0 8 0 futexpl 56 33719 0 33719 1 0 1 1 0 8 1 knotepl 112 337 0 310 3 2 1 2 0 8 0 kqueuepl 104 269 0 267 1 0 1 1 0 8 0 pipepl 112 3406 0 3387 4 3 1 2 0 8 0 fdescpl 424 1470 0 1456 2 0 2 2 0 8 0 filepl 120 11712 0 11617 5 1 4 5 0 8 0 lockfpl 104 212 0 211 3 2 1 1 0 8 0 lockfspl 32 189 0 188 3 2 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 1204 0 1197 1 0 1 1 0 8 0 zombiepl 144 1456 0 1456 2 1 1 1 0 8 1 processpl 840 1485 0 1456 4 0 4 4 0 8 0 procpl 600 2984 0 2946 4 0 4 4 0 8 0 sosppl 128 8 0 8 3 3 0 1 0 8 0 sockpl 384 1539 0 1522 4 1 3 4 0 8 1 mcl64k 65536 24 0 24 6 5 1 1 0 8 1 mcl16k 16384 3 0 3 3 3 0 1 0 8 0 mcl12k 12288 563 0 563 2 1 1 1 0 8 1 mcl9k 9216 18 0 18 5 4 1 1 0 8 1 mcl8k 8192 16 0 16 5 4 1 1 0 8 1 mcl4k 4096 65 0 65 3 2 1 1 0 8 1 mcl2k2 2112 15 0 15 5 4 1 1 0 8 1 mcl2k 2048 51345 0 51305 13 7 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 108264 0 108188 14 7 7 8 0 8 0 bufpl 256 7358 0 2979 274 0 274 274 0 8 0 anonpl 16 125339 0 116529 71 23 48 53 0 62 11 amapchunkpl 152 5292 0 5213 10 5 5 5 0 158 1 amappl16 192 5812 0 5328 48 14 34 36 0 8 9 amappl15 184 620 0 619 1 0 1 1 0 8 0 amappl14 176 31 0 27 1 0 1 1 0 8 0 amappl13 168 431 0 424 1 0 1 1 0 8 0 amappl12 160 11 0 11 2 2 0 1 0 8 0 amappl11 152 908 0 899 1 0 1 1 0 8 0 amappl10 144 73 0 71 2 1 1 1 0 8 0 amappl9 136 1063 0 1058 1 0 1 1 0 8 0 amappl8 128 152 0 124 1 0 1 1 0 8 0 amappl7 120 573 0 564 1 0 1 1 0 8 0 amappl6 112 57 0 49 1 0 1 1 0 8 0 amappl5 104 146 0 135 1 0 1 1 0 8 0 amappl4 96 292 0 269 1 0 1 1 0 8 0 amappl3 88 707 0 702 1 0 1 1 0 8 0 amappl2 80 13217 0 13168 2 0 2 2 0 8 1 amappl1 72 35498 0 35085 25 16 9 19 0 8 0 amappl 72 3218 0 3187 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 60 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1470 0 1456 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1470 0 1456 1 0 1 1 0 8 0 vmmpekpl 168 18829 0 18811 2 0 2 2 0 8 0 vmmpepl 168 152725 0 151308 126 42 84 84 0 357 16 vmsppl 264 1469 0 1456 3 1 2 2 0 8 1 pdppl 4096 2946 0 2912 6 1 5 6 0 8 0 pvpl 32 378165 0 366329 173 48 125 133 0 265 26 pmappl 192 1469 0 1456 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 431 0 32 12 0 12 12 0 8 0