panic: malloc: allocation too large, type = 2, size = 1073741832 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 259494 50733 0 0 0 1 syz-executor.1 *327040 50733 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(40000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff80000093ab00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8068f0a440,80085761,ffff800020c3f5b0,f,fffffd807f7c6600,ffff800020b61080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e1cd28,80085761,ffff800020c3f5b0,ffff800020b61080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b61080,ffff800020c3f6f8,ffff800020c3f6e0) at sys_ioctl+0x651 syscall(ffff800020c3f790) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3f790) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,107208a6010) at Xsyscall+0x128 end of kernel end trace frame: 0x1093ac323c0, 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 = 1073741832 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(40000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff80000093ab00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8068f0a440,80085761,ffff800020c3f5b0,f,fffffd807f7c6600,ffff800020b61080) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e1cd28,80085761,ffff800020c3f5b0,ffff800020b61080) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b61080,ffff800020c3f6f8,ffff800020c3f6e0) at sys_ioctl+0x651 syscall(ffff800020c3f790) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c3f790) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,107208a6010) at Xsyscall+0x128 end of kernel end trace frame: 0x1093ac323c0, count: -10 ddb{0}> show registers rdi 0xffffffff81215977 db_enter+0x17 rsi 0x1886 __ALIGN_SIZE+0x886 rbp 0xffff800020c3f180 rbx 0xffff800020c3f230 rdx 0x1887 __ALIGN_SIZE+0x887 rcx 0xffff800001966000 rax 0xffff800001966000 r8 0xffffffff81471d03 kprintf+0x183 r9 0x1 r10 0x25 r11 0xfa311805c43ffa95 r12 0x3000000008 r13 0xffff800020c3f190 r14 0x100 r15 0x1 rip 0xffffffff81215978 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c3f170 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=327040 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b61c38,0xffffffff82383278 process=0xffff800020b8d3c8 user=0xffff800020c3a000, vmspace=0xfffffd807f00b2d0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 50733 259494 74123 0 7 0 syz-executor.1 *50733 327040 74123 0 7 0x4000000 syz-executor.1 98498 406390 70858 0 2 0 syz-executor.0 98498 506005 70858 0 3 0x4000080 msgwait syz-executor.0 26329 221879 0 0 3 0x14200 bored sosplice 70858 356171 16044 0 3 0x82 nanosleep syz-executor.0 74123 318714 16044 0 3 0x82 nanosleep syz-executor.1 16044 35732 21983 0 3 0x82 thrsleep syz-fuzzer 16044 318208 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 418395 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 312362 21983 0 3 0x4000082 kqread syz-fuzzer 16044 520812 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 106484 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 132563 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 498777 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 364717 21983 0 3 0x4000082 thrsleep syz-fuzzer 16044 506370 21983 0 3 0x4000082 thrsleep syz-fuzzer 21983 139973 63855 0 3 0x10008a pause ksh 63855 179051 65273 0 3 0x92 select sshd 43041 193179 1 0 3 0x100083 ttyin getty 65273 265389 1 0 3 0x80 select sshd 33832 38233 24880 74 3 0x100092 bpf pflogd 24880 116982 1 0 3 0x80 netio pflogd 30368 487072 56487 73 3 0x100090 kqread syslogd 56487 180427 1 0 3 0x100082 netio syslogd 85955 193566 1 77 3 0x100090 poll dhclient 80138 280577 1 0 3 0x80 poll dhclient 1876 340772 0 0 2 0x14200 zerothread 33806 251136 0 0 3 0x14200 aiodoned aiodoned 12452 239427 0 0 3 0x14200 syncer update 62628 283724 0 0 3 0x14200 cleaner cleaner 73853 478502 0 0 3 0x14200 reaper reaper 58116 49589 0 0 3 0x14200 pgdaemon pagedaemon 25990 505477 0 0 3 0x14200 bored crynlk 64280 193753 0 0 3 0x14200 bored crypto 1111 86011 0 0 3 0x40014200 acpi0 acpi0 86805 95610 0 0 3 0x40014200 idle1 45036 12334 0 0 3 0x14200 bored softnet 77216 209786 0 0 3 0x14200 bored systqmp 23345 252445 0 0 3 0x14200 bored systq 48243 43682 0 0 3 0x40014200 bored softclock 45761 343447 0 0 3 0x40014200 idle0 31470 412817 0 0 3 0x14200 bored smr 1 309905 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 50733 (syz-executor.1) thread 0xffff800020b61080 (327040) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8235f818) 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 6427K 6427K 78643K 10688 0 0 pcb 25 9K 11K 78643K 188 0 0 rtable 100 3K 4K 78643K 325 0 0 ifaddr 53 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 24K 78643K 39 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 76K 78643K 1381 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 5 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 44 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 302 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 53 50K 71K 78643K 421 0 0 subproc 64 65538K 67586K 78643K 136 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 40 0 0 in_multi 33 2K 2K 78643K 74 0 0 ether_multi 1 0K 0K 78643K 4 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 220 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 29K 78643K 1841 0 0 UVM aobj 13 2K 2K 78643K 14 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 26 0 0 NDP 10 0K 0K 78643K 30 0 0 temp 129 2368K 2432K 78643K 4121 0 0 kqueue 0 0K 0K 78643K 3 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 190 0 183 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 59 0 19 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 0 1 1 0 8 1 tcpcb 544 73 0 69 1 0 1 1 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 ppxss 1128 10 0 10 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 18 0 11 1 0 1 1 0 8 0 pfstkey 112 18 0 11 1 0 1 1 0 8 0 pfstate 328 18 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 269 0 82 12 0 12 12 0 8 0 art_table 32 270 0 82 2 0 2 2 0 8 0 art_node 16 58 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 40 0 30 1 0 1 1 0 8 0 shmpl 112 12 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1943 0 515 47 0 47 47 0 8 0 ffsino 272 1943 0 515 96 0 96 96 0 8 0 nchpl 144 2560 0 920 61 0 61 61 0 8 0 uvmvnodes 72 2043 0 0 38 0 38 38 0 8 0 vnodes 200 2043 0 0 108 0 108 108 0 8 0 namei 1024 7232 0 7232 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 3 2 1 1 0 8 1 scxspl 192 6754 0 6754 7 6 1 6 0 8 1 sigapl 432 495 0 479 3 1 2 3 0 8 0 futexpl 56 3135 0 3135 2 1 1 1 0 8 1 knotepl 112 166 0 147 1 0 1 1 0 8 0 kqueuepl 104 106 0 104 1 0 1 1 0 8 0 pipepl 112 312 0 293 2 1 1 1 0 8 0 fdescpl 488 496 0 479 3 0 3 3 0 8 0 filepl 152 2815 0 2715 5 0 5 5 0 8 1 lockfpl 104 103 0 103 3 2 1 1 0 8 1 lockfspl 32 146 0 146 3 2 1 1 0 8 1 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 24 0 13 1 0 1 1 0 8 0 ucredpl 96 476 0 467 1 0 1 1 0 8 0 zombiepl 144 479 0 479 4 3 1 1 0 8 1 processpl 840 512 0 479 4 0 4 4 0 8 0 procpl 600 1132 0 1088 4 0 4 4 0 8 0 srpgc 64 12 0 12 2 1 1 1 0 8 1 sosppl 128 2 0 2 1 0 1 1 0 8 1 sockpl 384 339 0 320 5 1 4 4 0 8 2 mcl64k 65536 7 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 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 4 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 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 171 0 0 8 0 8 8 0 8 0 bufpl 256 6212 0 1143 317 0 317 317 0 8 0 anonpl 16 61943 0 54683 61 10 51 51 0 125 15 amapchunkpl 152 2638 0 2546 12 3 9 9 0 158 4 amappl16 192 2111 0 1673 42 12 30 34 0 8 8 amappl15 184 70 0 64 1 0 1 1 0 8 0 amappl14 176 113 0 111 2 1 1 1 0 8 0 amappl13 168 51 0 48 1 0 1 1 0 8 0 amappl12 160 106 0 103 1 0 1 1 0 8 0 amappl11 152 35 0 17 1 0 1 1 0 8 0 amappl10 144 220 0 212 1 0 1 1 0 8 0 amappl9 136 591 0 588 1 0 1 1 0 8 0 amappl8 128 150 0 133 1 0 1 1 0 8 0 amappl7 120 181 0 174 1 0 1 1 0 8 0 amappl6 112 56 0 48 1 0 1 1 0 8 0 amappl5 104 122 0 108 1 0 1 1 0 8 0 amappl4 96 667 0 632 2 1 1 2 0 8 0 amappl3 88 305 0 300 1 0 1 1 0 8 0 amappl2 80 3146 0 3082 2 0 2 2 0 8 0 amappl1 72 20265 0 19824 25 15 10 20 0 8 0 amappl 72 1396 0 1358 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 13 0 1 1 0 1 1 0 8 0 uaddrrnd 24 496 0 479 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 496 0 479 1 0 1 1 0 8 0 vmmpekpl 168 8042 0 8017 2 0 2 2 0 8 0 vmmpepl 168 60308 0 58793 100 22 78 80 0 357 12 vmsppl 360 495 0 479 2 0 2 2 0 8 0 pdppl 4096 999 0 958 8 2 6 6 0 8 0 pvpl 32 196210 0 185616 148 20 128 128 0 265 30 pmappl 224 495 0 479 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 472 0 7 14 0 14 14 0 8 0