panic: malloc: allocation too large, type = 2, size = 1351774128 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 17968 33530 0 0 0 0 syz-executor.1 *290259 33530 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(50926fb0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(a124df5) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(a124df5,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807529a080,80085761,ffff800020c45670,3,fffffd807f7c6ae0,ffff800020b384c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067840ef0,80085761,ffff800020c45670,ffff800020b384c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b384c8,ffff800020c457b8,ffff800020c457a0) at sys_ioctl+0x651 syscall(ffff800020c45850) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c45850) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,acdc47f8010) at Xsyscall+0x128 end of kernel end trace frame: 0xad030513590, 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 = 1351774128 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(50926fb0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(a124df5) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(a124df5,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807529a080,80085761,ffff800020c45670,3,fffffd807f7c6ae0,ffff800020b384c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067840ef0,80085761,ffff800020c45670,ffff800020b384c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b384c8,ffff800020c457b8,ffff800020c457a0) at sys_ioctl+0x651 syscall(ffff800020c45850) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c45850) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,acdc47f8010) at Xsyscall+0x128 end of kernel end trace frame: 0xad030513590, count: -10 ddb{1}> show registers rdi 0xffffffff81b0eb47 db_enter+0x17 rsi 0x18fb __ALIGN_SIZE+0x8fb rbp 0xffff800020c45240 rbx 0xffff800020c452f0 rdx 0x18fc __ALIGN_SIZE+0x8fc rcx 0xffff800002b66000 rax 0xffff800002b66000 r8 0xffffffff81476a83 kprintf+0x183 r9 0x1 r10 0x25 r11 0xee6de30adddd8a73 r12 0x3000000008 r13 0xffff800020c45250 r14 0x100 r15 0x1 rip 0xffffffff81b0eb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c45230 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=290259 stat=onproc flags process=0 proc=4000000 pri=77, usrpri=77, nice=20 forw=0xffffffffffffffff, list=0xffff800020b38e28,0xffffffff8237cfc8 process=0xffff800020b8c018 user=0xffff800020c40000, vmspace=0xfffffd807effd870 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 33530 17968 81377 0 7 0 syz-executor.1 *33530 290259 81377 0 7 0x4000000 syz-executor.1 43383 453297 3882 0 3 0x82 nanosleep syz-executor.0 81377 227975 3882 0 3 0x82 nanosleep syz-executor.1 3882 433888 28354 0 3 0x82 thrsleep syz-fuzzer 3882 441861 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 408491 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 431073 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 410486 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 237330 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 383246 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 81865 28354 0 3 0x4000082 thrsleep syz-fuzzer 3882 253639 28354 0 3 0x4000082 kqread syz-fuzzer 3882 214836 28354 0 3 0x4000082 thrsleep syz-fuzzer 28354 333035 54738 0 3 0x10008a pause ksh 54738 431106 81497 0 3 0x92 select sshd 61101 227961 1 0 3 0x100083 ttyin getty 81497 291731 1 0 3 0x80 select sshd 36604 258108 7232 74 3 0x100092 bpf pflogd 7232 283497 1 0 3 0x80 netio pflogd 18745 226493 6752 73 3 0x100090 kqread syslogd 6752 334790 1 0 3 0x100082 netio syslogd 83474 160254 1 77 3 0x100090 poll dhclient 81054 4708 1 0 3 0x80 poll dhclient 71491 366745 0 0 3 0x14200 pgzero zerothread 1364 192693 0 0 3 0x14200 aiodoned aiodoned 22715 374385 0 0 3 0x14200 syncer update 55180 372958 0 0 3 0x14200 cleaner cleaner 38132 498810 0 0 3 0x14200 reaper reaper 67637 312029 0 0 3 0x14200 pgdaemon pagedaemon 62140 322312 0 0 3 0x14200 bored crynlk 47483 155113 0 0 3 0x14200 bored crypto 66421 188633 0 0 3 0x40014200 acpi0 acpi0 23333 203181 0 0 3 0x40014200 idle1 68386 275856 0 0 3 0x14200 bored softnet 79432 338742 0 0 3 0x14200 bored systqmp 63251 250838 0 0 3 0x14200 bored systq 45975 477611 0 0 3 0x40014200 bored softclock 13512 33618 0 0 3 0x40014200 idle0 51665 495743 0 0 3 0x14200 bored smr 1 384983 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 33530 (syz-executor.1) thread 0xffff800020b384c8 (290259) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82394290) 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 9466 6397K 6397K 78643K 10572 0 0 pcb 25 9K 10K 78643K 110 0 0 rtable 100 3K 4K 78643K 220 0 0 ifaddr 39 10K 11K 78643K 51 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1470 0 0 iov 0 0K 12K 78643K 3 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1272 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 3 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 10 0K 0K 78643K 14 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 19K 78643K 120 0 0 sigio 0 0K 0K 78643K 7 0 0 proc 53 50K 71K 78643K 352 0 0 subproc 64 65538K 67586K 78643K 102 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 19 0 0 in_multi 33 2K 2K 78643K 44 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 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 205 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 85 20K 21K 78643K 1225 0 0 UVM aobj 6 2K 2K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 6 0K 0K 78643K 14 0 0 temp 95 2370K 2438K 78643K 3473 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 91 0 84 1 0 1 1 0 8 0 plimitpl 152 24 0 16 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 32 0 28 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 1 0 1 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 15 0 2 1 0 1 1 0 8 0 pfstkey 112 15 0 2 1 0 1 1 0 8 0 pfstate 328 15 0 2 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 226 0 41 12 0 12 12 0 8 0 art_table 32 227 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 1 0 1 1 0 8 0 semapl 112 10 0 2 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1619 0 201 46 0 46 46 0 8 0 ffsino 272 1619 0 201 95 0 95 95 0 8 0 nchpl 144 1991 0 355 61 0 61 61 0 8 0 uvmvnodes 72 1682 0 0 31 0 31 31 0 8 0 vnodes 200 1682 0 0 89 0 89 89 0 8 0 namei 1024 5238 0 5238 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4842 0 4842 7 6 1 6 0 8 1 sigapl 432 316 0 301 2 0 2 2 0 8 0 futexpl 56 1040 0 1040 1 0 1 1 0 8 1 knotepl 112 88 0 69 1 0 1 1 0 8 0 kqueuepl 104 26 0 24 1 0 1 1 0 8 0 pipepl 112 228 0 209 2 1 1 1 0 8 0 fdescpl 488 317 0 301 3 0 3 3 0 8 0 filepl 152 1684 0 1584 5 0 5 5 0 8 1 lockfpl 104 27 0 27 2 1 1 1 0 8 1 lockfspl 32 35 0 35 2 1 1 1 0 8 1 sessionpl 112 19 0 8 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 199 0 190 1 0 1 1 0 8 0 zombiepl 144 301 0 300 2 1 1 1 0 8 0 processpl 840 332 0 300 4 0 4 4 0 8 0 procpl 600 557 0 515 4 0 4 4 0 8 0 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 174 0 155 3 0 3 3 0 8 1 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 124 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 131 0 0 8 0 8 8 0 8 0 bufpl 256 5754 0 1143 289 0 289 289 0 8 0 anonpl 16 36832 0 29264 36 2 34 34 0 125 0 amapchunkpl 152 1400 0 1312 5 0 5 5 0 158 1 amappl16 192 899 0 477 23 0 23 23 0 8 1 amappl15 184 59 0 54 1 0 1 1 0 8 0 amappl14 176 29 0 25 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 15 0 14 1 0 1 1 0 8 0 amappl11 152 77 0 60 1 0 1 1 0 8 0 amappl10 144 68 0 65 1 0 1 1 0 8 0 amappl9 136 625 0 620 1 0 1 1 0 8 0 amappl8 128 190 0 173 1 0 1 1 0 8 0 amappl7 120 33 0 29 1 0 1 1 0 8 0 amappl6 112 102 0 95 1 0 1 1 0 8 0 amappl5 104 130 0 116 1 0 1 1 0 8 0 amappl4 96 548 0 518 2 1 1 2 0 8 0 amappl3 88 126 0 119 1 0 1 1 0 8 0 amappl2 80 1593 0 1537 2 0 2 2 0 8 0 amappl1 72 16352 0 15914 25 15 10 20 0 8 0 amappl 72 802 0 766 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 317 0 301 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 317 0 301 1 0 1 1 0 8 0 vmmpekpl 168 6658 0 6634 2 0 2 2 0 8 0 vmmpepl 168 41455 0 40035 86 9 77 77 0 357 11 vmsppl 360 316 0 301 2 0 2 2 0 8 0 pdppl 4096 642 0 602 6 0 6 6 0 8 0 pvpl 32 140587 0 129786 107 9 98 104 0 265 5 pmappl 224 316 0 301 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 439 0 4 13 0 13 13 0 8 0