panic: malloc: allocation too large, type = 2, size = 671088648 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 155235 76407 0 0 0 0 syz-executor.1 *357142 76407 0 0 0x4000000 1K 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 malloc(28000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(5000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8065e70e38,80085761,ffff800020c00df0,2,fffffd807f7c6a20,ffff800020b399e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb36140,80085761,ffff800020c00df0,ffff800020b399e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b399e0,ffff800020c00f38,ffff800020c00f20) at sys_ioctl+0x651 syscall(ffff800020c00fd0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c00fd0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,376c24df010) at Xsyscall+0x128 end of kernel end trace frame: 0x3792a2efda0, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic malloc: allocation too large, type = 2, size = 671088648 ddb{1}> 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 malloc(28000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(5000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000000,ffff800000026f00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8065e70e38,80085761,ffff800020c00df0,2,fffffd807f7c6a20,ffff800020b399e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb36140,80085761,ffff800020c00df0,ffff800020b399e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b399e0,ffff800020c00f38,ffff800020c00f20) at sys_ioctl+0x651 syscall(ffff800020c00fd0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c00fd0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,376c24df010) at Xsyscall+0x128 end of kernel end trace frame: 0x3792a2efda0, count: -10 ddb{1}> show registers rdi 0xffffffff81adbfd7 db_enter+0x17 rsi 0x18b7 __ALIGN_SIZE+0x8b7 rbp 0xffff800020c009c0 rbx 0xffff800020c00a70 rdx 0x18b8 __ALIGN_SIZE+0x8b8 rcx 0xffff800001766000 rax 0xffff800001766000 r8 0xffffffff81d75573 kprintf+0x183 r9 0x1 r10 0x25 r11 0xb5c87d5fd8488afe r12 0x3000000008 r13 0xffff800020c009d0 r14 0x100 r15 0x1 rip 0xffffffff81adbfd8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c009b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=357142 stat=onproc flags process=0 proc=4000000 pri=76, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff800020b38270,0xffffffff8235c268 process=0xffff800020b8cd38 user=0xffff800020bfc000, vmspace=0xfffffd807effe9d8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 76407 155235 89294 0 7 0 syz-executor.1 *76407 357142 89294 0 7 0x4000000 syz-executor.1 89294 372078 26428 0 3 0x82 nanosleep syz-executor.1 16985 58053 26428 0 3 0x82 nanosleep syz-executor.0 12330 291782 0 0 3 0x14200 bored sosplice 26428 455711 94719 0 3 0x82 thrsleep syz-fuzzer 26428 259440 94719 0 3 0x4000082 nanosleep syz-fuzzer 26428 322368 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 138580 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 175399 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 482480 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 450876 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 58007 94719 0 3 0x4000082 kqread syz-fuzzer 26428 191860 94719 0 3 0x4000082 thrsleep syz-fuzzer 26428 50550 94719 0 3 0x4000082 thrsleep syz-fuzzer 94719 498886 67141 0 3 0x10008a pause ksh 67141 71971 73462 0 3 0x92 select sshd 39273 496607 1 0 3 0x100083 ttyin getty 73462 455927 1 0 3 0x80 select sshd 84828 115746 25381 74 3 0x100092 bpf pflogd 25381 5368 1 0 3 0x80 netio pflogd 8121 254824 45374 73 3 0x100090 kqread syslogd 45374 253923 1 0 3 0x100082 netio syslogd 87435 205048 1 77 3 0x100090 poll dhclient 23869 276797 1 0 3 0x80 poll dhclient 27341 113240 0 0 3 0x14200 pgzero zerothread 20870 90195 0 0 3 0x14200 aiodoned aiodoned 29994 387617 0 0 3 0x14200 syncer update 37442 301940 0 0 3 0x14200 cleaner cleaner 68942 216526 0 0 3 0x14200 reaper reaper 9251 302539 0 0 3 0x14200 pgdaemon pagedaemon 47114 280830 0 0 3 0x14200 bored crynlk 38800 441353 0 0 3 0x14200 bored crypto 86127 490193 0 0 3 0x40014200 acpi0 acpi0 80238 467415 0 0 3 0x40014200 idle1 21486 167737 0 0 3 0x14200 bored softnet 32696 76703 0 0 3 0x14200 bored systqmp 68664 473618 0 0 3 0x14200 bored systq 65798 486245 0 0 3 0x40014200 bored softclock 56265 291894 0 0 3 0x40014200 idle0 82270 405452 0 0 3 0x14200 bored smr 1 341808 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 76407 (syz-executor.1) thread 0xffff800020b399e0 (357142) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823681d0) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9526 26899K 27299K 78643K 10943 0 0 pcb 25 9K 11K 78643K 282 0 0 rtable 100 3K 4K 78643K 403 0 0 ifaddr 55 12K 13K 78643K 131 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1482 0 0 iov 0 0K 16K 78643K 63 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1672 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 9 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 71 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 21K 78643K 604 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 54 51K 71K 78643K 445 0 0 subproc 64 65538K 67586K 78643K 204 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 55 0 0 in_multi 33 2K 2K 78643K 95 0 0 ether_multi 1 0K 0K 78643K 4 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 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 252 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 80 20K 24K 78643K 2679 0 0 UVM aobj 23 2K 2K 78643K 26 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 18 0 0 NDP 11 0K 0K 78643K 40 0 0 temp 154 2376K 2442K 78643K 4923 0 0 kqueue 0 0K 0K 78643K 2 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 8 0 4 1 0 1 1 0 8 0 inpcbpl 280 283 0 276 1 0 1 1 0 8 0 plimitpl 152 35 0 27 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 77 0 37 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9 0 9 1 1 0 1 0 8 0 tcpcb 544 94 0 90 1 0 1 1 0 8 0 nd6 48 12 0 8 1 0 1 1 0 8 0 ppxss 1128 12 0 12 2 1 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 27 0 11 1 0 1 1 0 8 0 pfstkey 112 27 0 11 1 0 1 1 0 8 0 pfstate 328 27 0 11 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 355 0 167 12 0 12 12 0 8 0 art_table 32 356 0 167 2 0 2 2 0 8 0 art_node 16 76 0 42 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 4 1 0 1 1 0 8 0 semapl 112 69 0 59 1 0 1 1 0 8 0 shmpl 112 24 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2702 0 1268 47 0 47 47 0 8 0 ffsino 272 2702 0 1268 96 0 96 96 0 8 0 nchpl 144 3678 0 2030 62 0 62 62 0 8 0 uvmvnodes 72 2850 0 0 52 0 52 52 0 8 0 vnodes 200 2850 0 0 150 0 150 150 0 8 0 namei 1024 10133 0 10133 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 9162 0 9162 8 7 1 6 0 8 1 sigapl 432 791 0 776 2 0 2 2 0 8 0 futexpl 56 5861 0 5861 1 0 1 1 0 8 1 knotepl 112 202 0 183 1 0 1 1 0 8 0 kqueuepl 104 106 0 104 1 0 1 1 0 8 0 pipepl 112 454 0 435 2 1 1 1 0 8 0 fdescpl 488 792 0 776 3 0 3 3 0 8 0 filepl 152 4267 0 4167 5 0 5 5 0 8 1 lockfpl 104 170 0 170 2 1 1 1 0 8 1 lockfspl 32 202 0 202 2 1 1 1 0 8 1 sessionpl 112 22 0 11 1 0 1 1 0 8 0 pgrppl 48 26 0 15 1 0 1 1 0 8 0 ucredpl 96 669 0 660 1 0 1 1 0 8 0 zombiepl 144 776 0 775 2 1 1 1 0 8 0 processpl 840 808 0 775 4 0 4 4 0 8 0 procpl 600 1918 0 1875 4 0 4 4 0 8 0 srpgc 64 24 0 24 3 3 0 1 0 8 0 sosppl 128 10 0 10 2 2 0 1 0 8 0 sockpl 384 518 0 499 4 1 3 4 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 17 0 0 2 0 2 2 0 8 0 mcl9k 9216 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 6 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 130 0 0 16 0 16 16 0 8 1 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 160 0 0 8 0 8 8 0 8 0 bufpl 256 6496 0 1147 335 0 335 335 0 8 0 anonpl 16 84495 0 75801 57 21 36 50 0 125 0 amapchunkpl 152 4403 0 4312 18 13 5 9 0 158 0 amappl16 192 3327 0 2877 34 10 24 33 0 8 1 amappl15 184 61 0 56 1 0 1 1 0 8 0 amappl14 176 34 0 32 2 1 1 1 0 8 0 amappl13 168 105 0 102 1 0 1 1 0 8 0 amappl12 160 22 0 19 1 0 1 1 0 8 0 amappl11 152 232 0 215 1 0 1 1 0 8 0 amappl10 144 341 0 337 1 0 1 1 0 8 0 amappl9 136 606 0 603 1 0 1 1 0 8 0 amappl8 128 158 0 143 1 0 1 1 0 8 0 amappl7 120 40 0 34 1 0 1 1 0 8 0 amappl6 112 265 0 259 1 0 1 1 0 8 0 amappl5 104 134 0 118 1 0 1 1 0 8 0 amappl4 96 1096 0 1068 2 1 1 2 0 8 0 amappl3 88 173 0 167 1 0 1 1 0 8 0 amappl2 80 5789 0 5735 2 0 2 2 0 8 0 amappl1 72 25913 0 25471 25 15 10 20 0 8 0 amappl 72 2200 0 2165 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 25 0 3 1 0 1 1 0 8 0 uaddrrnd 24 792 0 776 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 792 0 776 1 0 1 1 0 8 0 vmmpekpl 168 10290 0 10265 2 0 2 2 0 8 0 vmmpepl 168 89674 0 88230 100 31 69 79 0 357 2 vmsppl 360 791 0 776 2 0 2 2 0 8 0 pdppl 4096 1592 0 1552 6 0 6 6 0 8 0 pvpl 32 260140 0 248174 142 34 108 131 0 265 10 pmappl 224 791 0 776 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 489 0 4 14 0 14 14 0 8 0