panic: malloc: allocation too large, type = 2, size = 1074790408 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 271089 50507 0 0 0 1 syz-executor.1 *382251 50507 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(40100008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8020000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8020000,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8079c966e0,80085761,ffff800020c57770,2,fffffd807f7c6900,ffff800020b9a270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068915a30,80085761,ffff800020c57770,ffff800020b9a270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b9a270,ffff800020c578b8,ffff800020c578a0) at sys_ioctl+0x651 syscall(ffff800020c57950) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c57950) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,49a126dc010) at Xsyscall+0x128 end of kernel end trace frame: 0x49c437232f0, 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 = 1074790408 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(40100008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8020000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8020000,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8079c966e0,80085761,ffff800020c57770,2,fffffd807f7c6900,ffff800020b9a270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8068915a30,80085761,ffff800020c57770,ffff800020b9a270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b9a270,ffff800020c578b8,ffff800020c578a0) at sys_ioctl+0x651 syscall(ffff800020c57950) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c57950) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,49a126dc010) at Xsyscall+0x128 end of kernel end trace frame: 0x49c437232f0, count: -10 ddb{0}> show registers rdi 0xffffffff81b0eb47 db_enter+0x17 rsi 0x18f2 __ALIGN_SIZE+0x8f2 rbp 0xffff800020c57340 rbx 0xffff800020c573f0 rdx 0x18f3 __ALIGN_SIZE+0x8f3 rcx 0xffff800002b66000 rax 0xffff800002b66000 r8 0xffffffff81476a83 kprintf+0x183 r9 0x1 r10 0x25 r11 0xfe68af53d92ee712 r12 0x3000000008 r13 0xffff800020c57350 r14 0x100 r15 0x1 rip 0xffffffff81b0eb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c57330 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=382251 stat=onproc flags process=0 proc=4000000 pri=58, usrpri=58, nice=20 forw=0xffffffffffffffff, list=0xffff800020b9a978,0xffff800020b9a028 process=0xffff800020b8cd38 user=0xffff800020c52000, vmspace=0xfffffd807effd438 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50507 271089 52629 0 7 0 syz-executor.1 *50507 382251 52629 0 7 0x4000000 syz-executor.1 50507 22868 52629 0 3 0x4000080 fsleep syz-executor.1 65503 300358 0 0 3 0x14200 bored sosplice 52629 434684 14773 0 3 0x82 nanosleep syz-executor.1 32823 21236 14773 0 3 0x82 nanosleep syz-executor.0 14773 507608 52819 0 3 0x82 thrsleep syz-fuzzer 14773 145609 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 107310 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 467202 52819 0 3 0x4000082 kqread syz-fuzzer 14773 219955 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 36536 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 486801 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 4851 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 128094 52819 0 3 0x4000082 thrsleep syz-fuzzer 14773 227922 52819 0 3 0x4000082 thrsleep syz-fuzzer 52819 1151 15593 0 3 0x10008a pause ksh 15593 204463 77789 0 3 0x92 select sshd 28577 320369 1 0 3 0x100083 ttyin getty 77789 18997 1 0 3 0x80 select sshd 26427 367357 54992 74 3 0x100092 bpf pflogd 54992 35671 1 0 3 0x80 netio pflogd 25889 111479 23670 73 3 0x100090 kqread syslogd 23670 109530 1 0 3 0x100082 netio syslogd 8175 20730 1 77 3 0x100090 poll dhclient 72389 508902 1 0 3 0x80 poll dhclient 5178 9186 0 0 3 0x14200 pgzero zerothread 63074 459507 0 0 3 0x14200 aiodoned aiodoned 28688 327682 0 0 3 0x14200 syncer update 7500 171582 0 0 3 0x14200 cleaner cleaner 3797 305086 0 0 3 0x14200 reaper reaper 30736 242374 0 0 3 0x14200 pgdaemon pagedaemon 78864 324285 0 0 3 0x14200 bored crynlk 75323 366072 0 0 3 0x14200 bored crypto 47755 132633 0 0 3 0x40014200 acpi0 acpi0 15436 105914 0 0 3 0x40014200 idle1 49494 454251 0 0 3 0x14200 bored softnet 52752 490873 0 0 3 0x14200 bored systqmp 45184 97690 0 0 3 0x14200 bored systq 74590 320485 0 0 3 0x40014200 bored softclock 62813 202878 0 0 3 0x40014200 idle0 57454 174507 0 0 3 0x14200 bored smr 1 141612 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 50507 (syz-executor.1) thread 0xffff800020b9a270 (382251) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9501 6399K 6407K 78643K 10618 0 0 pcb 25 9K 10K 78643K 145 0 0 rtable 100 3K 4K 78643K 201 0 0 ifaddr 52 12K 12K 78643K 58 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1471 0 0 iov 0 0K 12K 78643K 19 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 75K 78643K 1265 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 0K 0K 78643K 28 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 167 0 0 proc 54 51K 71K 78643K 350 0 0 subproc 64 65538K 67586K 78643K 68 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 16 0 0 in_multi 33 2K 2K 78643K 40 0 0 ether_multi 1 0K 0K 78643K 2 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 201 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 81 20K 21K 78643K 1393 0 0 UVM aobj 14 2K 2K 78643K 16 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 2 0 0 NDP 10 0K 0K 78643K 15 0 0 temp 124 2370K 2435K 78643K 3556 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 119 0 112 1 0 1 1 0 8 0 plimitpl 152 21 0 13 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 sackhl 24 1 0 1 1 0 1 1 0 8 1 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 36 0 32 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 1 0 1 1 1 0 1 0 8 0 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 2 0 2 1 1 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 12 0 2 1 0 1 1 0 8 0 pfstkey 112 12 0 2 1 0 1 1 0 8 0 pfstate 328 12 0 2 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 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 0 1 1 0 8 1 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 14 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1706 0 292 46 0 46 46 0 8 0 ffsino 272 1706 0 292 95 0 95 95 0 8 0 nchpl 144 2152 0 519 61 0 61 61 0 8 0 uvmvnodes 72 1754 0 0 32 0 32 32 0 8 0 vnodes 200 1754 0 0 93 0 93 93 0 8 0 namei 1024 5655 0 5655 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 5586 0 5586 9 8 1 6 0 8 1 sigapl 432 366 0 351 3 1 2 3 0 8 0 futexpl 56 1769 0 1768 1 0 1 1 0 8 0 knotepl 112 78 0 59 1 0 1 1 0 8 0 kqueuepl 104 48 0 46 1 0 1 1 0 8 0 pipepl 112 204 0 185 2 1 1 1 0 8 0 fdescpl 488 367 0 351 3 0 3 3 0 8 0 filepl 152 1917 0 1817 6 1 5 5 0 8 1 lockfpl 104 71 0 71 2 1 1 1 0 8 1 lockfspl 32 69 0 69 2 1 1 1 0 8 1 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 22 0 11 1 0 1 1 0 8 0 ucredpl 96 244 0 235 1 0 1 1 0 8 0 zombiepl 144 351 0 350 3 2 1 1 0 8 0 processpl 840 383 0 350 4 0 4 4 0 8 0 procpl 600 748 0 704 4 0 4 4 0 8 0 sosppl 128 3 0 3 2 1 1 1 0 8 1 sockpl 384 232 0 213 4 1 3 3 0 8 1 mcl64k 65536 3 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 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 114 0 0 14 0 14 14 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 5944 0 1145 300 0 300 300 0 8 0 anonpl 16 44615 0 35616 53 3 50 51 0 125 13 amapchunkpl 152 1653 0 1564 8 3 5 6 0 158 0 amappl16 192 1356 0 883 34 5 29 34 0 8 5 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 28 0 24 2 1 1 1 0 8 0 amappl13 168 175 0 168 1 0 1 1 0 8 0 amappl12 160 8 0 8 1 1 0 1 0 8 0 amappl11 152 27 0 12 1 0 1 1 0 8 0 amappl10 144 71 0 66 1 0 1 1 0 8 0 amappl9 136 650 0 646 1 0 1 1 0 8 0 amappl8 128 207 0 192 1 0 1 1 0 8 0 amappl7 120 29 0 27 1 0 1 1 0 8 0 amappl6 112 61 0 51 1 0 1 1 0 8 0 amappl5 104 117 0 103 1 0 1 1 0 8 0 amappl4 96 588 0 559 2 1 1 2 0 8 0 amappl3 88 117 0 111 1 0 1 1 0 8 0 amappl2 80 2115 0 2060 3 1 2 2 0 8 0 amappl1 72 17579 0 17131 25 15 10 20 0 8 0 amappl 72 983 0 947 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 15 0 2 1 0 1 1 0 8 0 uaddrrnd 24 367 0 351 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 367 0 351 1 0 1 1 0 8 0 vmmpekpl 168 7113 0 7092 3 1 2 2 0 8 0 vmmpepl 168 46479 0 44991 99 21 78 79 0 357 8 vmsppl 360 366 0 351 2 0 2 2 0 8 0 pdppl 4096 742 0 702 6 0 6 6 0 8 0 pvpl 32 155600 0 143370 140 9 131 132 0 265 31 pmappl 224 366 0 351 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 450 0 5 13 0 13 13 0 8 0