` '” - ›` '” - ›panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 157597 74905 0 0 0 1 syz-executor.1 *245204 74905 0 0 0x4000000 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 max(ffffffff80000000,8) at max wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8068887ac8,80085761,ffff800020c0d300,6,fffffd807f7c67e0,ffff800020b65788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e14018,80085761,ffff800020c0d300,ffff800020b65788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b65788,ffff800020c0d448,ffff800020c0d430) at sys_ioctl+0x651 syscall(ffff800020c0d4e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0d4e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,429192b8010) at Xsyscall+0x128 end of kernel end trace frame: 0x42be25cd510, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic mallocarray: overflow 18446744071562067968 * 8 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 max(ffffffff80000000,8) at max wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8068887ac8,80085761,ffff800020c0d300,6,fffffd807f7c67e0,ffff800020b65788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e14018,80085761,ffff800020c0d300,ffff800020b65788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b65788,ffff800020c0d448,ffff800020c0d430) at sys_ioctl+0x651 syscall(ffff800020c0d4e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c0d4e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,429192b8010) at Xsyscall+0x128 end of kernel end trace frame: 0x42be25cd510, count: -10 ddb{0}> show registers rdi 0xffffffff8151a287 db_enter+0x17 rsi 0x14c0 __ALIGN_SIZE+0x4c0 rbp 0xffff800020c0cf40 rbx 0xffff800020c0cff0 rdx 0x14c1 __ALIGN_SIZE+0x4c1 rcx 0xffff800000963000 rax 0xffff800000963000 r8 0xffffffff818b7283 kprintf+0x183 r9 0x1 r10 0x25 r11 0xff66e3546ac2a823 r12 0x3000000008 r13 0xffff800020c0cf50 r14 0x100 r15 0x1 rip 0xffffffff8151a288 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c0cf30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=245204 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b64018,0xffff800020b65540 process=0xffff800020b7cd38 user=0xffff800020c08000, vmspace=0xfffffd807f00bb40 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 87133 194422 26312 0 2 0 syz-executor.0 74905 157597 88184 0 7 0 syz-executor.1 *74905 245204 88184 0 7 0x4000000 syz-executor.1 88184 489276 80823 0 3 0x82 nanosleep syz-executor.1 93605 229754 1 0 3 0x100083 ttyin getty 26312 394190 80823 0 3 0x82 nanosleep syz-executor.0 74081 279152 0 0 3 0x14200 bored sosplice 80823 474957 58157 0 3 0x82 thrsleep syz-fuzzer 80823 249979 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 302670 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 115474 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 14572 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 73511 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 141060 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 379980 58157 0 3 0x4000082 thrsleep syz-fuzzer 80823 384877 58157 0 3 0x4000082 kqread syz-fuzzer 80823 150321 58157 0 3 0x4000082 thrsleep syz-fuzzer 58157 297316 86752 0 3 0x10008a pause ksh 86752 16066 50195 0 3 0x92 select sshd 50195 478583 1 0 3 0x80 select sshd 36443 244926 58477 74 3 0x100092 bpf pflogd 58477 214546 1 0 3 0x80 netio pflogd 25932 161035 30817 73 3 0x100090 kqread syslogd 30817 331717 1 0 3 0x100082 netio syslogd 87989 54866 1 77 3 0x100090 poll dhclient 12760 35727 1 0 3 0x80 poll dhclient 44103 109394 0 0 2 0x14200 zerothread 1263 515013 0 0 3 0x14200 aiodoned aiodoned 2244 325095 0 0 3 0x14200 syncer update 55497 187296 0 0 3 0x14200 cleaner cleaner 65965 457911 0 0 3 0x14200 reaper reaper 32599 499899 0 0 3 0x14200 pgdaemon pagedaemon 57485 384381 0 0 3 0x14200 bored crynlk 41489 77799 0 0 3 0x14200 bored crypto 5186 238368 0 0 3 0x40014200 acpi0 acpi0 15779 155995 0 0 3 0x40014200 idle1 92423 957 0 0 3 0x14200 bored softnet 76394 55347 0 0 3 0x14200 bored systqmp 96328 78899 0 0 3 0x14200 bored systq 26001 128686 0 0 3 0x40014200 bored softclock 34728 135715 0 0 3 0x40014200 idle0 67422 263209 0 0 3 0x14200 bored smr 1 35437 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 74905 (syz-executor.1) thread 0xffff800020b65788 (245204) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8234bf90) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9534 6425K 6431K 78643K 10898 0 0 pcb 25 9K 11K 78643K 576 0 0 rtable 100 3K 4K 78643K 491 0 0 ifaddr 62 14K 14K 78643K 164 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1491 0 0 iov 0 0K 24K 78643K 101 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 76K 78643K 1688 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 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 113 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 874 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 54 51K 71K 78643K 522 0 0 subproc 64 65538K 67586K 78643K 238 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 111 0 0 in_multi 33 2K 2K 78643K 110 0 0 ether_multi 1 0K 0K 78643K 6 0 0 mrt 0 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 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 289 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 83 20K 29K 78643K 3685 0 0 UVM aobj 36 2K 2K 78643K 48 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 52 0 0 NDP 13 0K 0K 78643K 50 0 0 temp 179 2379K 2497K 78643K 5769 0 0 kqueue 0 0K 0K 78643K 3 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> 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 510 0 503 1 0 1 1 0 8 0 plimitpl 152 55 0 47 1 0 1 1 0 8 0 plcache 128 20 0 0 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 tcpcb 544 184 0 180 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 ppxss 1128 14 0 14 5 5 0 1 0 8 0 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 30 0 20 1 0 1 1 0 8 0 pfstkey 112 30 0 20 1 0 1 1 0 8 0 pfstate 328 30 0 20 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 398 0 207 12 0 12 12 0 8 0 art_table 32 399 0 207 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 19 0 13 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 109 0 99 1 0 1 1 0 8 0 shmpl 112 46 0 12 2 0 2 2 0 8 1 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2935 0 1494 47 0 47 47 0 8 0 ffsino 272 2935 0 1494 97 0 97 97 0 8 0 nchpl 144 4404 0 2751 62 0 62 62 0 8 0 uvmvnodes 72 3133 0 0 57 0 57 57 0 8 0 vnodes 200 3133 0 0 165 0 165 165 0 8 0 namei 1024 13119 0 13119 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 12842 0 12842 16 15 1 6 0 8 1 sigapl 432 1059 0 1043 3 1 2 3 0 8 0 futexpl 56 10054 0 10054 1 0 1 1 0 8 1 knotepl 112 335 0 316 1 0 1 1 0 8 0 kqueuepl 104 216 0 214 1 0 1 1 0 8 0 pipepl 112 714 0 695 3 2 1 2 0 8 0 fdescpl 488 1060 0 1043 3 0 3 3 0 8 0 filepl 152 6446 0 6346 6 1 5 6 0 8 1 lockfpl 104 294 0 294 3 2 1 1 0 8 1 lockfspl 32 360 0 360 3 2 1 1 0 8 1 sessionpl 112 24 0 13 1 0 1 1 0 8 0 pgrppl 48 40 0 29 1 0 1 1 0 8 0 ucredpl 96 1501 0 1492 1 0 1 1 0 8 0 zombiepl 144 1043 0 1043 1 0 1 1 0 8 1 processpl 840 1076 0 1043 4 0 4 4 0 8 0 procpl 600 2905 0 2862 4 0 4 4 0 8 0 srpgc 64 30 0 30 5 4 1 1 0 8 1 sosppl 128 10 0 10 4 4 0 1 0 8 0 sockpl 384 1020 0 1001 5 1 4 4 0 8 2 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 9 0 0 2 0 2 2 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 117 0 0 14 0 14 14 0 8 0 mtagpl 80 3 0 0 1 0 1 1 0 8 0 mbufpl 256 170 0 0 8 0 8 8 0 8 0 bufpl 256 7722 0 1155 411 0 411 411 0 8 0 anonpl 16 121213 0 113542 67 22 45 53 0 125 6 amapchunkpl 152 5962 0 5871 17 12 5 9 0 158 0 amappl16 192 5107 0 4643 55 31 24 36 0 8 0 amappl15 184 156 0 152 1 0 1 1 0 8 0 amappl14 176 540 0 534 1 0 1 1 0 8 0 amappl13 168 27 0 24 1 0 1 1 0 8 0 amappl12 160 457 0 454 1 0 1 1 0 8 0 amappl11 152 116 0 101 1 0 1 1 0 8 0 amappl10 144 197 0 194 1 0 1 1 0 8 0 amappl9 136 629 0 624 1 0 1 1 0 8 0 amappl8 128 186 0 169 1 0 1 1 0 8 0 amappl7 120 171 0 164 1 0 1 1 0 8 0 amappl6 112 150 0 141 1 0 1 1 0 8 0 amappl5 104 124 0 110 1 0 1 1 0 8 0 amappl4 96 860 0 829 2 1 1 2 0 8 0 amappl3 88 1096 0 1087 1 0 1 1 0 8 0 amappl2 80 8268 0 8210 2 0 2 2 0 8 0 amappl1 72 32381 0 31935 26 16 10 20 0 8 0 amappl 72 3185 0 3148 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 47 0 12 1 0 1 1 0 8 0 uaddrrnd 24 1060 0 1043 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1060 0 1043 1 0 1 1 0 8 0 vmmpekpl 168 12794 0 12775 2 0 2 2 0 8 0 vmmpepl 168 121623 0 120103 121 40 81 81 0 357 9 vmsppl 360 1059 0 1043 2 0 2 2 0 8 0 pdppl 4096 2128 0 2086 6 0 6 6 0 8 0 pvpl 32 358156 0 347132 166 34 132 140 0 265 29 pmappl 224 1059 0 1043 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 563 0 3 16 0 16 16 0 8 0