panic: mallocarray: overflow 18446744071562067968 * 8 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 60219 17986 0 0 0 1 syz-executor.0 *110050 17986 0 0 0x4000000 0K syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 intel_set_memory_cxsr(ffffffff80000000,8) at intel_set_memory_cxsr wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001983400) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8063fa1c30,80085761,ffff800020c53200,f,fffffd807f7c69c0,ffff800020b6d9e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807c93d688,80085761,ffff800020c53200,ffff800020b6d9e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6d9e0,ffff800020c53348,ffff800020c53330) at sys_ioctl+0x651 syscall(ffff800020c533e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c533e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,1b91bf38010) at Xsyscall+0x128 end of kernel end trace frame: 0x1bbc744e6e0, 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 intel_set_memory_cxsr(ffffffff80000000,8) at intel_set_memory_cxsr wsmux_getmux(7fffffff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7fffffff,ffff800001983400) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8063fa1c30,80085761,ffff800020c53200,f,fffffd807f7c69c0,ffff800020b6d9e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807c93d688,80085761,ffff800020c53200,ffff800020b6d9e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b6d9e0,ffff800020c53348,ffff800020c53330) at sys_ioctl+0x651 syscall(ffff800020c533e0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c533e0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,1b91bf38010) at Xsyscall+0x128 end of kernel end trace frame: 0x1bbc744e6e0, count: -10 ddb{0}> show registers rdi 0xffffffff817432d7 db_enter+0x17 rsi 0x141e __ALIGN_SIZE+0x41e rbp 0xffff800020c52e40 rbx 0xffff800020c52ef0 rdx 0x141f __ALIGN_SIZE+0x41f rcx 0xffff800000966000 rax 0xffff800000966000 r8 0xffffffff81b5c743 kprintf+0x183 r9 0x1 r10 0x25 r11 0x6652615b49916311 r12 0x3000000008 r13 0xffff800020c52e50 r14 0x100 r15 0x1 rip 0xffffffff817432d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c52e30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=110050 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b6ce28,0xffffffff823e48c0 process=0xffff800020b7c9f0 user=0xffff800020c4e000, vmspace=0xfffffd807f00b708 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 17986 60219 97603 0 7 0 syz-executor.0 *17986 110050 97603 0 7 0x4000000 syz-executor.0 33791 6236 89776 0 3 0x80 nanosleep syz-executor.1 33791 22213 89776 0 3 0x4000080 netio syz-executor.1 33791 175918 89776 0 3 0x4000080 fsleep syz-executor.1 66569 285861 0 0 3 0x14200 bored sosplice 89776 182287 13803 0 3 0x82 nanosleep syz-executor.1 97603 4023 13803 0 3 0x82 nanosleep syz-executor.0 13803 110668 22263 0 3 0x82 thrsleep syz-fuzzer 13803 412543 22263 0 3 0x4000082 nanosleep syz-fuzzer 13803 206768 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 100784 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 300824 22263 0 3 0x4000082 kqread syz-fuzzer 13803 129339 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 239028 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 403954 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 481566 22263 0 3 0x4000082 thrsleep syz-fuzzer 13803 17230 22263 0 3 0x4000082 thrsleep syz-fuzzer 22263 164421 98301 0 3 0x10008a pause ksh 98301 204546 98591 0 3 0x92 select sshd 98395 58297 1 0 3 0x100083 ttyin getty 98591 60222 1 0 3 0x80 select sshd 4833 409609 74692 74 3 0x100092 bpf pflogd 74692 442100 1 0 3 0x80 netio pflogd 23357 177622 61648 73 3 0x100090 kqread syslogd 61648 373225 1 0 3 0x100082 netio syslogd 26410 206954 1 77 3 0x100090 poll dhclient 96095 34555 1 0 3 0x80 poll dhclient 15283 257038 0 0 3 0x14200 pgzero zerothread 97766 76695 0 0 3 0x14200 aiodoned aiodoned 33047 201324 0 0 3 0x14200 syncer update 66394 377971 0 0 3 0x14200 cleaner cleaner 37891 79914 0 0 3 0x14200 reaper reaper 4870 253038 0 0 3 0x14200 pgdaemon pagedaemon 18145 256078 0 0 3 0x14200 bored crynlk 29249 372422 0 0 3 0x14200 bored crypto 76324 276336 0 0 3 0x40014200 acpi0 acpi0 71154 429927 0 0 3 0x40014200 idle1 27023 490387 0 0 3 0x14200 bored softnet 62345 347381 0 0 3 0x14200 bored systqmp 1675 26837 0 0 3 0x14200 bored systq 35145 341350 0 0 3 0x40014200 bored softclock 54764 455740 0 0 3 0x40014200 idle0 74297 521124 0 0 3 0x14200 bored smr 1 426469 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 17986 (syz-executor.0) thread 0xffff800020b6d9e0 (110050) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82346f00) 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 9496 6433K 6433K 78643K 10722 0 0 pcb 26 9K 10K 78643K 281 0 0 rtable 100 3K 4K 78643K 276 0 0 ifaddr 49 12K 13K 78643K 108 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 12K 78643K 36 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 75K 76K 78643K 1373 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 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 62 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 338 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 53 50K 83K 78643K 380 0 0 subproc 64 65538K 67586K 78643K 72 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 32 0 0 in_multi 33 2K 2K 78643K 34 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 212 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 86 20K 29K 78643K 1945 0 0 UVM aobj 19 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 25 0 0 NDP 9 0K 0K 78643K 28 0 0 temp 123 2372K 2444K 78643K 4119 0 0 kqueue 0 0K 0K 78643K 4 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 192 0 185 1 0 1 1 0 8 0 plimitpl 152 23 0 15 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 18 0 18 1 1 0 1 0 8 0 tcpcb 544 62 0 58 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 15 0 15 1 0 1 1 0 8 1 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 18 0 6 1 0 1 1 0 8 0 pfstkey 112 18 0 6 1 0 1 1 0 8 0 pfstate 328 18 0 6 1 0 1 1 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 186 0 0 12 0 12 12 0 8 0 art_table 32 187 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 1 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 58 0 48 1 0 1 1 0 8 0 shmpl 112 17 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2029 0 615 46 0 46 46 0 8 0 ffsino 272 2029 0 615 95 0 95 95 0 8 0 nchpl 144 2738 0 1107 61 0 61 61 0 8 0 uvmvnodes 72 2113 0 0 39 0 39 39 0 8 0 vnodes 200 2113 0 0 112 0 112 112 0 8 0 namei 1024 7530 0 7530 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 7237 0 7237 10 8 2 6 0 8 2 sigapl 432 537 0 521 2 0 2 2 0 8 0 futexpl 56 4222 0 4221 2 1 1 1 0 8 0 knotepl 112 122 0 103 1 0 1 1 0 8 0 kqueuepl 104 118 0 116 1 0 1 1 0 8 0 pipepl 112 362 0 343 2 1 1 1 0 8 0 fdescpl 488 538 0 521 3 0 3 3 0 8 0 filepl 152 3201 0 3100 6 1 5 5 0 8 0 lockfpl 104 89 0 89 3 2 1 1 0 8 1 lockfspl 32 66 0 66 3 2 1 1 0 8 1 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 461 0 452 1 0 1 1 0 8 0 zombiepl 144 521 0 521 3 2 1 1 0 8 1 processpl 840 554 0 521 4 0 4 4 0 8 0 procpl 600 1284 0 1239 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 433 0 413 4 1 3 3 0 8 1 mcl64k 65536 256 0 0 32 2 30 32 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 351 0 0 21 0 21 21 0 8 0 bufpl 256 6335 0 1143 325 0 325 325 0 8 0 anonpl 16 63494 0 54610 54 10 44 51 0 125 7 amapchunkpl 152 2641 0 2552 10 1 9 9 0 158 5 amappl16 192 2491 0 2022 39 14 25 34 0 8 0 amappl15 184 58 0 53 1 0 1 1 0 8 0 amappl14 176 189 0 183 2 1 1 1 0 8 0 amappl13 168 27 0 23 1 0 1 1 0 8 0 amappl12 160 9 0 9 1 1 0 1 0 8 0 amappl11 152 25 0 10 1 0 1 1 0 8 0 amappl10 144 71 0 66 1 0 1 1 0 8 0 amappl9 136 735 0 730 1 0 1 1 0 8 0 amappl8 128 290 0 275 1 0 1 1 0 8 0 amappl7 120 28 0 26 1 0 1 1 0 8 0 amappl6 112 58 0 50 1 0 1 1 0 8 0 amappl5 104 118 0 104 1 0 1 1 0 8 0 amappl4 96 768 0 737 2 1 1 2 0 8 0 amappl3 88 287 0 280 1 0 1 1 0 8 0 amappl2 80 3608 0 3547 2 0 2 2 0 8 0 amappl1 72 21001 0 20537 26 16 10 20 0 8 0 amappl 72 1515 0 1477 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 0 1 0 1 1 0 8 0 uaddrrnd 24 538 0 521 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 538 0 521 1 0 1 1 0 8 0 vmmpekpl 168 8638 0 8612 2 0 2 2 0 8 0 vmmpepl 168 64002 0 62437 94 23 71 77 0 357 1 vmsppl 360 537 0 521 2 0 2 2 0 8 0 pdppl 4096 1084 0 1042 6 0 6 6 0 8 0 pvpl 32 198728 0 186528 136 13 123 131 0 265 20 pmappl 224 537 0 521 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 521 0 7 15 0 15 15 0 8 0