panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 9680 71791 0 0 0x4000000 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 cd9660_init(ffffffff80000000) at cd9660_init 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(fffffd802b8d50e8,80085761,ffff8000149f01b0,82,fffffd803f7c6ae0,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803b583d38,80085761,ffff8000149f01b0,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149f02f8,ffff8000149f02e0) at sys_ioctl+0x638 syscall(ffff8000149f0390) at syscall+0x541 Xsyscall(6,0,ffffffffffffff85,0,3,7f27e4bd010) at Xsyscall+0x128 end of kernel end trace frame: 0x7f52f7abe30, 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:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 cd9660_init(ffffffff80000000) at cd9660_init 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(fffffd802b8d50e8,80085761,ffff8000149f01b0,82,fffffd803f7c6ae0,ffff8000ffff2978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803b583d38,80085761,ffff8000149f01b0,ffff8000ffff2978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2978,ffff8000149f02f8,ffff8000149f02e0) at sys_ioctl+0x638 syscall(ffff8000149f0390) at syscall+0x541 Xsyscall(6,0,ffffffffffffff85,0,3,7f27e4bd010) at Xsyscall+0x128 end of kernel end trace frame: 0x7f52f7abe30, count: -10 ddb> show registers rdi 0xffffffff81ac0e57 db_enter+0x17 rsi 0x18f6 __ALIGN_SIZE+0x8f6 rbp 0xffff8000149efdf0 rbx 0xffff8000149efea0 rdx 0x18f7 __ALIGN_SIZE+0x8f7 rcx 0xffff80000173b000 rax 0xffff80000173b000 r8 0xffff8000149efdb0 r9 0x1 r10 0xffff800001b3b500 r11 0xcb98ca8e08d63e41 r12 0x3000000008 r13 0xffff8000149efe00 r14 0x100 r15 0x1 rip 0xffffffff81ac0e58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149efde0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=9680 stat=onproc flags process=0 proc=4000000 pri=59, usrpri=59, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3788,0xffffffff82262138 process=0xffff8000ffff7708 user=0xffff8000149eb000, vmspace=0xfffffd803f013c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 71791 125833 77587 0 2 0 syz-executor.0 *71791 9680 77587 0 7 0x4000000 syz-executor.0 2970 76918 84820 0 2 0 syz-executor.1 2970 115879 84820 0 2 0x4000000 syz-executor.1 63279 58224 1 0 3 0x100083 ttyin getty 77587 82900 5304 0 3 0x82 nanosleep syz-executor.0 84820 439515 5304 0 3 0x82 nanosleep syz-executor.1 81176 70687 0 0 3 0x14200 bored sosplice 5304 131374 63825 0 3 0x82 thrsleep syz-fuzzer 5304 405772 63825 0 3 0x4000082 thrsleep syz-fuzzer 5304 175270 63825 0 3 0x4000082 thrsleep syz-fuzzer 5304 514272 63825 0 3 0x4000082 thrsleep syz-fuzzer 5304 288395 63825 0 3 0x4000082 kqread syz-fuzzer 5304 236818 63825 0 3 0x4000082 thrsleep syz-fuzzer 5304 495434 63825 0 3 0x4000082 thrsleep syz-fuzzer 5304 154339 63825 0 3 0x4000082 thrsleep syz-fuzzer 63825 327727 6096 0 3 0x10008a pause ksh 6096 165936 56 0 3 0x92 select sshd 56 263912 1 0 3 0x80 select sshd 4152 237716 31412 73 3 0x100090 kqread syslogd 31412 210474 1 0 3 0x100082 netio syslogd 74604 10964 1 77 3 0x100090 poll dhclient 24151 448877 1 0 3 0x80 poll dhclient 97954 451047 0 0 2 0x14200 zerothread 94708 374160 0 0 3 0x14200 aiodoned aiodoned 25750 411352 0 0 3 0x14200 syncer update 93006 158428 0 0 3 0x14200 cleaner cleaner 60862 312501 0 0 3 0x14200 reaper reaper 34934 391731 0 0 3 0x14200 pgdaemon pagedaemon 94534 401344 0 0 3 0x14200 bored crynlk 68058 401390 0 0 3 0x14200 bored crypto 18519 52484 0 0 3 0x40014200 acpi0 acpi0 27836 247772 0 0 3 0x14200 bored softnet 93718 57491 0 0 3 0x14200 bored systqmp 94837 201868 0 0 3 0x14200 bored systq 69592 205280 0 0 3 0x40014200 bored softclock 15618 464613 0 0 3 0x40014200 idle0 54137 59820 0 0 3 0x14200 bored smr 1 425490 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 9486 6342K 6344K 78643K 10683 0 0 pcb 23 9K 9K 78643K 139 0 0 rtable 100 3K 3K 78643K 273 0 0 ifaddr 52 12K 12K 78643K 82 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 17 0 0 iov 0 0K 16K 78643K 32 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 75K 78643K 1362 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 12 0K 1K 78643K 32 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 221 0 0 proc 41 30K 46K 78643K 312 0 0 subproc 64 65538K 67586K 78643K 136 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 18 0 0 in_multi 33 2K 2K 78643K 67 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 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 187 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 74 20K 21K 78643K 1281 0 0 UVM aobj 15 2K 2K 78643K 19 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 8 0 0 NDP 10 0K 0K 78643K 24 0 0 temp 131 2352K 2480K 78643K 3603 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 120 0 113 2 1 1 2 0 8 0 plimitpl 152 29 0 22 1 0 1 1 0 8 0 rtentry 112 59 0 19 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 44 0 40 1 0 1 1 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 ppxss 1128 4 0 4 2 2 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 267 0 82 12 0 12 12 0 8 0 art_table 32 268 0 82 2 0 2 2 0 8 0 art_node 16 58 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semapl 112 30 0 20 1 0 1 1 0 8 0 shmpl 112 17 0 4 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1794 0 380 46 0 46 46 0 8 0 ffsino 240 1794 0 380 84 0 84 84 0 8 0 nchpl 144 2284 0 650 61 0 61 61 0 8 0 uvmvnodes 72 1909 0 0 35 0 35 35 0 8 0 vnodes 200 1909 0 0 101 0 101 101 0 8 0 namei 1024 6006 0 6006 1 0 1 1 0 8 1 scxspl 192 6996 0 6996 7 6 1 6 0 8 1 sigapl 432 386 0 372 2 0 2 2 0 8 0 futexpl 56 3381 0 3381 1 0 1 1 0 8 1 knotepl 112 144 0 125 1 0 1 1 0 8 0 kqueuepl 104 59 0 57 1 0 1 1 0 8 0 pipepl 112 272 0 253 1 0 1 1 0 8 0 fdescpl 424 387 0 372 2 0 2 2 0 8 0 filepl 120 2179 0 2083 4 0 4 4 0 8 0 lockfpl 104 70 0 69 2 1 1 1 0 8 0 lockfspl 32 91 0 90 2 1 1 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 332 0 325 1 0 1 1 0 8 0 zombiepl 144 372 0 372 1 0 1 1 0 8 1 processpl 840 402 0 372 4 0 4 4 0 8 0 procpl 600 666 0 627 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 1 1 1 0 8 1 sockpl 384 224 0 207 3 0 3 3 0 8 1 mcl64k 65536 10 0 10 2 1 1 1 0 8 1 mcl12k 12288 6 0 6 1 0 1 1 0 8 1 mcl9k 9216 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 24 0 24 2 1 1 1 0 8 1 mcl2k 2048 48355 0 48322 9 4 5 8 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 79602 0 79531 11 3 8 9 0 8 0 bufpl 256 5899 0 1423 280 0 280 280 0 8 0 anonpl 16 54579 0 45692 54 2 52 52 0 62 15 amapchunkpl 152 1556 0 1475 5 0 5 5 0 158 0 amappl16 192 1930 0 1455 41 5 36 36 0 8 12 amappl15 184 97 0 92 1 0 1 1 0 8 0 amappl14 176 88 0 85 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 74 0 71 1 0 1 1 0 8 0 amappl11 152 59 0 48 1 0 1 1 0 8 0 amappl10 144 143 0 138 1 0 1 1 0 8 0 amappl9 136 546 0 543 1 0 1 1 0 8 0 amappl8 128 120 0 108 1 0 1 1 0 8 0 amappl7 120 111 0 105 1 0 1 1 0 8 0 amappl6 112 96 0 89 1 0 1 1 0 8 0 amappl5 104 129 0 119 1 0 1 1 0 8 0 amappl4 96 507 0 478 2 1 1 2 0 8 0 amappl3 88 252 0 242 1 0 1 1 0 8 0 amappl2 80 2341 0 2282 2 0 2 2 0 8 0 amappl1 72 16100 0 15681 26 17 9 19 0 8 0 amappl 72 888 0 855 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 18 0 4 1 0 1 1 0 8 0 uaddrrnd 24 387 0 372 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 387 0 372 1 0 1 1 0 8 0 vmmpekpl 168 6908 0 6889 2 0 2 2 0 8 0 vmmpepl 168 50435 0 48959 90 19 71 79 0 357 5 vmsppl 264 386 0 372 2 1 1 2 0 8 0 pdppl 4096 780 0 744 5 0 5 5 0 8 0 pvpl 32 188859 0 176837 146 8 138 138 0 265 39 pmappl 192 386 0 372 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 414 0 12 12 0 12 12 0 8 0