panic: malloc: allocation too large, type = 2, size = 671088648 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 517747 18316 0 0 0 1 syz-executor.0 * 74415 98065 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 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,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd806538c9f8,80085761,ffff800020c05470,42,fffffd807f7c6960,ffff800020b652d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806599b0b8,80085761,ffff800020c05470,ffff800020b652d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b652d8,ffff800020c055b8,ffff800020c055a0) at sys_ioctl+0x651 syscall(ffff800020c05650) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c05650) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,209d73e9010) at Xsyscall+0x128 end of kernel end trace frame: 0x20cad754d00, 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 malloc: allocation too large, type = 2, size = 671088648 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 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,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd806538c9f8,80085761,ffff800020c05470,42,fffffd807f7c6960,ffff800020b652d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806599b0b8,80085761,ffff800020c05470,ffff800020b652d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b652d8,ffff800020c055b8,ffff800020c055a0) at sys_ioctl+0x651 syscall(ffff800020c05650) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c05650) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,209d73e9010) at Xsyscall+0x128 end of kernel end trace frame: 0x20cad754d00, count: -10 ddb{0}> show registers rdi 0xffffffff81d528d7 db_enter+0x17 rsi 0x1b66 __ALIGN_SIZE+0xb66 rbp 0xffff800020c05040 rbx 0xffff800020c050f0 rdx 0x1b67 __ALIGN_SIZE+0xb67 rcx 0xffff800001566000 rax 0xffff800001566000 r8 0xffffffff81b94ad3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xe8ff09a7d5050537 r12 0x3000000008 r13 0xffff800020c05050 r14 0x100 r15 0x1 rip 0xffffffff81d528d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c05030 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=74415 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b64018,0xffff800020b65090 process=0xffff800020b2ad30 user=0xffff800020c00000, vmspace=0xfffffd807effe870 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 18316 517747 98164 0 7 0 syz-executor.0 98065 76571 2242 0 3 0x80 fsleep syz-executor.1 *98065 74415 2242 0 7 0x4000000 syz-executor.1 98164 209975 7146 0 3 0x82 nanosleep syz-executor.0 2242 229259 7146 0 2 0x482 syz-executor.1 12402 42487 1 0 3 0x100083 ttyin getty 27694 183700 0 0 3 0x14200 bored sosplice 7146 360882 54502 0 3 0x82 thrsleep syz-fuzzer 7146 381538 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 326844 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 73705 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 463709 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 167141 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 358235 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 259045 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 141261 54502 0 3 0x4000082 thrsleep syz-fuzzer 7146 138194 54502 0 3 0x4000082 kqread syz-fuzzer 54502 430006 49149 0 3 0x10008a pause ksh 49149 141277 1918 0 3 0x92 select sshd 1918 411397 1 0 3 0x80 select sshd 76852 297280 10650 74 3 0x100092 bpf pflogd 10650 101982 1 0 3 0x80 netio pflogd 18842 225901 1106 73 3 0x100090 kqread syslogd 1106 116393 1 0 3 0x100082 netio syslogd 67588 359323 1 77 3 0x100090 poll dhclient 40051 24218 1 0 3 0x80 poll dhclient 35887 895 0 0 3 0x14200 pgzero zerothread 18035 315612 0 0 3 0x14200 aiodoned aiodoned 87448 85945 0 0 3 0x14200 syncer update 15774 356246 0 0 3 0x14200 cleaner cleaner 30060 8484 0 0 3 0x14200 reaper reaper 39298 414479 0 0 3 0x14200 pgdaemon pagedaemon 60952 431339 0 0 3 0x14200 bored crynlk 62303 41202 0 0 3 0x14200 bored crypto 68835 37963 0 0 3 0x40014200 acpi0 acpi0 26700 468705 0 0 3 0x40014200 idle1 1953 272895 0 0 3 0x14200 bored softnet 27160 510492 0 0 3 0x14200 bored systqmp 92608 303632 0 0 3 0x14200 bored systq 96757 320378 0 0 3 0x40014200 bored softclock 36866 486028 0 0 3 0x40014200 idle0 74720 221995 0 0 3 0x14200 bored smr 1 317567 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 98065 (syz-executor.1) thread 0xffff800020b652d8 (74415) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823e9b78) 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 9575 26926K 35121K 78643K 12747 0 0 pcb 25 9K 10K 78643K 839 0 0 rtable 100 3K 4K 78643K 999 0 0 ifaddr 71 16K 16K 78643K 390 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1496 0 0 iov 0 0K 24K 78643K 1287 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1212 76K 76K 78643K 3597 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 25 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 244 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 3024 0 0 sigio 0 0K 0K 78643K 8 0 0 proc 54 51K 79K 78643K 744 0 0 subproc 64 65538K 67586K 78643K 428 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 1803 0 0 in_multi 33 2K 2K 78643K 846 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 0 0K 0K 78643K 11 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 342 0 0 pfkey data 0 0K 0K 78643K 4 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 99 21K 30K 78643K 9932 0 0 UVM aobj 100 7K 7K 78643K 114 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 96 0 0 NDP 16 0K 0K 78643K 122 0 0 temp 200 2380K 2458K 78643K 11119 0 0 kqueue 0 0K 0K 78643K 11 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 14 0 10 1 0 1 1 0 8 0 inpcbpl 280 1732 0 1725 1 0 1 1 0 8 0 plimitpl 152 79 0 71 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 135 0 95 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 319 0 315 1 0 1 1 0 8 0 rttmr 72 2 0 2 2 2 0 1 0 8 0 nd6 48 24 0 20 1 0 1 1 0 8 0 ppxss 1128 40 0 40 22 22 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 43 0 38 1 0 1 1 0 8 0 pfstkey 112 43 0 38 1 0 1 1 0 8 0 pfstate 328 43 0 38 2 1 1 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 615 0 424 12 0 12 12 0 8 0 art_table 32 616 0 424 2 0 2 2 0 8 0 art_node 16 132 0 98 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 11 4 3 1 1 0 8 0 semupl 112 5 0 5 1 1 0 1 0 8 0 semapl 112 242 0 232 1 0 1 1 0 8 0 shmpl 112 112 0 14 4 1 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8462 0 6990 51 3 48 48 0 8 0 ffsino 272 8462 0 6990 99 0 99 99 0 8 0 nchpl 144 13133 0 11463 62 0 62 62 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 38706 0 38706 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 7 0 7 4 4 0 1 0 8 0 scxspl 192 32346 0 32346 21 20 1 6 0 8 1 sigapl 432 3195 0 3179 2 0 2 2 0 8 0 futexpl 56 46280 0 46279 1 0 1 1 0 8 0 knotepl 112 561 0 542 1 0 1 1 0 8 0 kqueuepl 104 423 0 421 1 0 1 1 0 8 0 pipepl 112 2760 0 2741 3 2 1 2 0 8 0 fdescpl 488 3196 0 3179 3 0 3 3 0 8 0 filepl 152 18535 0 18434 5 0 5 5 0 8 1 lockfpl 104 723 0 722 26 25 1 1 0 8 0 lockfspl 32 714 0 713 26 25 1 1 0 8 0 sessionpl 112 30 0 19 1 0 1 1 0 8 0 pgrppl 48 52 0 41 1 0 1 1 0 8 0 ucredpl 96 2469 0 2460 1 0 1 1 0 8 0 zombiepl 144 3179 0 3179 2 1 1 1 0 8 1 processpl 840 3212 0 3179 4 0 4 4 0 8 0 procpl 600 8985 0 8942 5 1 4 5 0 8 0 srpgc 64 62 0 62 10 10 0 1 0 8 0 sosppl 128 31 0 31 10 10 0 1 0 8 0 sockpl 384 2443 0 2424 3 0 3 3 0 8 1 mcl64k 65536 18 0 0 3 0 3 3 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 16 0 0 2 0 2 2 0 8 0 mcl9k 9216 16 0 0 2 0 2 2 0 8 0 mcl8k 8192 10 0 0 2 0 2 2 0 8 0 mcl4k 4096 41 0 0 5 2 3 3 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 221 0 0 15 5 10 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 486 0 0 9 2 7 9 0 8 0 bufpl 256 10847 0 3824 440 0 440 440 0 8 0 anonpl 16 273053 0 265517 74 33 41 53 0 125 0 amapchunkpl 152 16805 0 16700 38 32 6 10 0 158 0 amappl16 192 13927 0 13379 82 54 28 40 0 8 0 amappl15 184 195 0 189 1 0 1 1 0 8 0 amappl14 176 868 0 865 2 1 1 1 0 8 0 amappl13 168 332 0 329 1 0 1 1 0 8 0 amappl12 160 937 0 937 4 4 0 1 0 8 0 amappl11 152 26 0 10 1 0 1 1 0 8 0 amappl10 144 327 0 322 1 0 1 1 0 8 0 amappl9 136 1913 0 1910 1 0 1 1 0 8 0 amappl8 128 1498 0 1477 1 0 1 1 0 8 0 amappl7 120 303 0 293 1 0 1 1 0 8 0 amappl6 112 74 0 64 1 0 1 1 0 8 0 amappl5 104 283 0 269 1 0 1 1 0 8 0 amappl4 96 2883 0 2854 2 1 1 2 0 8 0 amappl3 88 1816 0 1810 1 0 1 1 0 8 0 amappl2 80 27020 0 26961 2 0 2 2 0 8 0 amappl1 72 73312 0 72863 25 15 10 20 0 8 0 amappl 72 9309 0 9271 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 113 0 14 2 0 2 2 0 8 0 uaddrrnd 24 3196 0 3179 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3196 0 3179 1 0 1 1 0 8 0 vmmpekpl 168 30457 0 30430 2 0 2 2 0 8 0 vmmpepl 168 331284 0 329684 231 150 81 93 0 357 6 vmsppl 360 3195 0 3179 2 0 2 2 0 8 0 pdppl 4096 6400 0 6358 6 0 6 6 0 8 0 pvpl 32 1183200 0 1172156 237 125 112 138 0 265 0 pmappl 224 3195 0 3179 6 5 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 603 0 13 17 0 17 17 0 8 0