panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 99681 81217 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 mipi_dsi_attach(ffffffff80000000) at mipi_dsi_attach 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(fffffd8030b0d508,80085761,ffff8000149feed0,2,fffffd803f7c6c60,ffff8000149c8018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fb15bc8,80085761,ffff8000149feed0,ffff8000149c8018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149c8018,ffff8000149ff018,ffff8000149ff000) at sys_ioctl+0x638 syscall(ffff8000149ff0b0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,129c086b010) at Xsyscall+0x128 end of kernel end trace frame: 0x12c74abacd0, 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 mipi_dsi_attach(ffffffff80000000) at mipi_dsi_attach 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(fffffd8030b0d508,80085761,ffff8000149feed0,2,fffffd803f7c6c60,ffff8000149c8018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fb15bc8,80085761,ffff8000149feed0,ffff8000149c8018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149c8018,ffff8000149ff018,ffff8000149ff000) at sys_ioctl+0x638 syscall(ffff8000149ff0b0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,129c086b010) at Xsyscall+0x128 end of kernel end trace frame: 0x12c74abacd0, count: -10 ddb> show registers rdi 0xffffffff8169fb87 db_enter+0x17 rsi 0x15de __ALIGN_SIZE+0x5de rbp 0xffff8000149feb10 rbx 0xffff8000149febc0 rdx 0x15df __ALIGN_SIZE+0x5df rcx 0xffff80000194c000 rax 0xffff80000194c000 r8 0xffff8000149fead0 r9 0x1 r10 0xffff80000153ad40 r11 0x350e743ed8fe7b8d r12 0x3000000008 r13 0xffff8000149feb20 r14 0x100 r15 0x1 rip 0xffffffff8169fb88 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149feb00 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=99681 stat=onproc flags process=0 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff8000149c8bd0,0xffffffff822f0178 process=0xffff8000ffff7a50 user=0xffff8000149fa000, vmspace=0xfffffd803f013000 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 81217 269315 56555 0 2 0 syz-executor.0 *81217 99681 56555 0 7 0x4000000 syz-executor.0 74924 199967 13429 0 2 0 syz-executor.1 74924 385514 13429 0 3 0x4000080 fsleep syz-executor.1 13429 300783 61074 0 2 0x482 syz-executor.1 56555 56708 61074 0 3 0x82 nanosleep syz-executor.0 82434 135107 1 0 3 0x100083 ttyin getty 90490 33344 0 0 3 0x14200 bored sosplice 61074 33422 67102 0 3 0x82 thrsleep syz-fuzzer 61074 58320 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 257696 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 90108 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 297547 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 118024 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 317060 67102 0 3 0x4000082 thrsleep syz-fuzzer 61074 363934 67102 0 3 0x4000082 kqread syz-fuzzer 67102 187347 99090 0 3 0x10008a pause ksh 99090 299486 95349 0 3 0x92 select sshd 95349 192578 1 0 3 0x80 select sshd 43436 237314 56213 73 3 0x100090 kqread syslogd 56213 363360 1 0 3 0x100082 netio syslogd 98114 315724 1 77 3 0x100090 poll dhclient 1672 59299 1 0 3 0x80 poll dhclient 72867 176583 0 0 2 0x14200 zerothread 70711 444061 0 0 3 0x14200 aiodoned aiodoned 42006 450172 0 0 3 0x14200 syncer update 86528 188165 0 0 3 0x14200 cleaner cleaner 85284 463915 0 0 3 0x14200 reaper reaper 47428 437228 0 0 3 0x14200 pgdaemon pagedaemon 13014 484417 0 0 3 0x14200 bored crynlk 73697 21826 0 0 3 0x14200 bored crypto 46686 262630 0 0 3 0x40014200 acpi0 acpi0 54895 21325 0 0 3 0x14200 bored softnet 73188 490866 0 0 3 0x14200 bored systqmp 28265 105727 0 0 3 0x14200 bored systq 73293 470989 0 0 3 0x40014200 bored softclock 9277 38518 0 0 3 0x40014200 idle0 46797 498239 0 0 3 0x14200 bored smr 1 414818 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 9508 6349K 6365K 78643K 11235 0 0 pcb 23 9K 11K 78643K 978 0 0 rtable 100 3K 3K 78643K 1448 0 0 ifaddr 58 14K 16K 78643K 409 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 63 0 0 iov 0 0K 16K 78643K 222 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1197 75K 76K 78643K 2344 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 34 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 176 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 1759 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 42 30K 54K 78643K 1043 0 0 subproc 64 65538K 67586K 78643K 1126 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 193 0 0 in_multi 33 2K 2K 78643K 417 0 0 ether_multi 1 0K 0K 78643K 8 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 476 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 90 21K 26K 78643K 4949 0 0 UVM aobj 130 9K 9K 78643K 150 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 82 0 0 NDP 14 0K 0K 78643K 151 0 0 temp 170 2355K 2431K 78643K 9354 0 0 kqueue 0 0K 0K 78643K 10 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 35 0 31 1 0 1 1 0 8 0 inpcbpl 280 880 0 873 1 0 1 1 0 8 0 plimitpl 152 82 0 75 1 0 1 1 0 8 0 rtentry 112 320 0 280 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 282 0 278 1 0 1 1 0 8 0 nd6 48 66 0 62 1 0 1 1 0 8 0 ppxss 1128 38 0 38 9 8 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1498 0 1309 14 2 12 13 0 8 0 art_table 32 1499 0 1309 2 0 2 2 0 8 0 art_node 16 319 0 285 1 0 1 1 0 8 0 sysvmsgpl 40 37 0 19 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 172 0 162 1 0 1 1 0 8 0 shmpl 112 148 0 20 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4162 0 2672 49 0 49 49 0 8 0 ffsino 240 4162 0 2672 88 0 88 88 0 8 0 nchpl 144 6797 0 5116 63 0 63 63 0 8 0 uvmvnodes 72 4860 0 0 89 0 89 89 0 8 0 vnodes 200 4860 0 0 256 0 256 256 0 8 0 namei 1024 21835 0 21835 2 1 1 1 0 8 1 scsiplug 64 4 0 4 3 3 0 1 0 8 0 scxspl 192 22225 0 22225 12 11 1 6 0 8 1 sigapl 432 1836 0 1822 2 0 2 2 0 8 0 futexpl 56 26951 0 26950 1 0 1 1 0 8 0 knotepl 112 985 0 958 4 3 1 2 0 8 0 kqueuepl 104 522 0 520 1 0 1 1 0 8 0 pipepl 112 1448 0 1429 6 5 1 2 0 8 0 fdescpl 424 1837 0 1822 2 0 2 2 0 8 0 filepl 120 12097 0 12001 4 0 4 4 0 8 1 lockfpl 104 426 0 426 4 3 1 1 0 8 1 lockfspl 32 177 0 177 4 3 1 1 0 8 1 sessionpl 112 50 0 40 1 0 1 1 0 8 0 pgrppl 48 58 0 48 1 0 1 1 0 8 0 ucredpl 96 2248 0 2241 1 0 1 1 0 8 0 zombiepl 144 1822 0 1822 2 1 1 1 0 8 1 processpl 840 1852 0 1822 4 0 4 4 0 8 0 procpl 600 3757 0 3718 4 0 4 4 0 8 0 sosppl 128 31 0 31 9 9 0 1 0 8 0 sockpl 384 1695 0 1678 4 1 3 4 0 8 1 mcl64k 65536 274 0 274 20 20 0 15 0 8 0 mcl16k 16384 6 0 6 6 6 0 1 0 8 0 mcl12k 12288 40 0 40 8 7 1 1 0 8 1 mcl9k 9216 24 0 24 5 5 0 1 0 8 0 mcl8k 8192 28 0 28 6 5 1 1 0 8 1 mcl4k 4096 96 0 96 6 5 1 1 0 8 1 mcl2k2 2112 18 0 18 7 7 0 1 0 8 0 mcl2k 2048 48929 0 48895 11 6 5 9 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 91453 0 91379 21 13 8 14 0 8 1 bufpl 256 8986 0 4630 273 0 273 273 0 8 0 anonpl 16 199730 0 192330 75 36 39 52 0 62 0 amapchunkpl 152 8418 0 8336 17 12 5 9 0 158 1 amappl16 192 10006 0 9514 95 69 26 38 0 8 1 amappl15 184 238 0 235 1 0 1 1 0 8 0 amappl14 176 310 0 305 1 0 1 1 0 8 0 amappl13 168 468 0 465 1 0 1 1 0 8 0 amappl12 160 408 0 408 4 3 1 1 0 8 1 amappl11 152 643 0 632 1 0 1 1 0 8 0 amappl10 144 92 0 90 1 0 1 1 0 8 0 amappl9 136 772 0 768 1 0 1 1 0 8 0 amappl8 128 460 0 437 1 0 1 1 0 8 0 amappl7 120 407 0 402 1 0 1 1 0 8 0 amappl6 112 305 0 297 1 0 1 1 0 8 0 amappl5 104 429 0 414 1 0 1 1 0 8 0 amappl4 96 494 0 470 2 1 1 2 0 8 0 amappl3 88 331 0 326 1 0 1 1 0 8 0 amappl2 80 15659 0 15593 2 0 2 2 0 8 0 amappl1 72 43421 0 42988 24 14 10 19 0 8 0 amappl 72 4172 0 4139 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 149 0 20 3 0 3 3 0 8 0 uaddrrnd 24 1837 0 1822 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1837 0 1822 1 0 1 1 0 8 0 vmmpekpl 168 16210 0 16189 2 0 2 2 0 8 0 vmmpepl 168 207153 0 205639 126 46 80 84 0 357 11 vmsppl 264 1836 0 1822 3 2 1 2 0 8 0 pdppl 4096 3680 0 3644 6 1 5 6 0 8 0 pvpl 32 574714 0 564214 177 78 99 133 0 265 0 pmappl 192 1836 0 1822 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 460 0 61 12 0 12 12 0 8 0