panic: malloc: allocation too large, type = 2, size = 15228190864 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *137369 78029 0 0 0x4000000 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(38babc090,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(71757811) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(71757811,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8035ccc400,80085761,ffff800014a03f80,42,fffffd803f7c6ba0,ffff8000ffff4970) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fc145b0,80085761,ffff800014a03f80,ffff8000ffff4970) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff4970,ffff800014a040c8,ffff800014a040b0) at sys_ioctl+0x638 syscall(ffff800014a04160) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,912a6eed010) at Xsyscall+0x128 end of kernel end trace frame: 0x91562936030, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic malloc: allocation too large, type = 2, size = 15228190864 ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(38babc090,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(71757811) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(71757811,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8035ccc400,80085761,ffff800014a03f80,42,fffffd803f7c6ba0,ffff8000ffff4970) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fc145b0,80085761,ffff800014a03f80,ffff8000ffff4970) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff4970,ffff800014a040c8,ffff800014a040b0) at sys_ioctl+0x638 syscall(ffff800014a04160) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,912a6eed010) at Xsyscall+0x128 end of kernel end trace frame: 0x91562936030, count: -10 ddb> show registers rdi 0xffffffff81c210d7 db_enter+0x17 rsi 0x1dcf __ALIGN_SIZE+0xdcf rbp 0xffff800014a03b50 rbx 0xffff800014a03c00 rdx 0x1dd0 __ALIGN_SIZE+0xdd0 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a03b10 r9 0x1 r10 0xffff800000936800 r11 0xdab3d59bacfec89 r12 0x3000000008 r13 0xffff800014a03b60 r14 0x100 r15 0x1 rip 0xffffffff81c210d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a03b40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=137369 stat=onproc flags process=0 proc=4000000 pri=67, usrpri=67, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5528,0xffffffff82252c30 process=0xffff8000ffff7708 user=0xffff8000149ff000, vmspace=0xfffffd803f014a50 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 78029 152770 25610 0 2 0 syz-executor.1 *78029 137369 25610 0 7 0x4000000 syz-executor.1 79258 394363 1 0 3 0x100083 ttyin getty 2615 158983 0 0 3 0x14200 bored sosplice 89075 74577 85840 0 3 0x82 nanosleep syz-executor.0 25610 352875 85840 0 3 0x82 nanosleep syz-executor.1 85840 69327 28451 0 3 0x82 thrsleep syz-fuzzer 85840 11897 28451 0 3 0x4000082 thrsleep syz-fuzzer 85840 47236 28451 0 3 0x4000082 thrsleep syz-fuzzer 85840 143486 28451 0 3 0x4000082 kqread syz-fuzzer 85840 254055 28451 0 3 0x4000082 thrsleep syz-fuzzer 85840 211567 28451 0 3 0x4000082 thrsleep syz-fuzzer 85840 313487 28451 0 3 0x4000082 thrsleep syz-fuzzer 28451 476499 25426 0 3 0x10008a pause ksh 25426 142144 81328 0 3 0x92 select sshd 81328 96821 1 0 3 0x80 select sshd 84588 269930 41023 73 3 0x100090 kqread syslogd 41023 480041 1 0 3 0x100082 netio syslogd 60552 456761 1 77 3 0x100090 poll dhclient 25630 400284 1 0 3 0x80 poll dhclient 90978 209770 0 0 2 0x14200 zerothread 89810 61788 0 0 3 0x14200 aiodoned aiodoned 87437 236503 0 0 3 0x14200 syncer update 87184 416364 0 0 3 0x14200 cleaner cleaner 93516 361781 0 0 3 0x14200 reaper reaper 42782 368612 0 0 3 0x14200 pgdaemon pagedaemon 60864 316725 0 0 3 0x14200 bored crynlk 3416 233492 0 0 3 0x14200 bored crypto 53892 4235 0 0 3 0x40014200 acpi0 acpi0 96051 333213 0 0 3 0x14200 bored softnet 35898 154507 0 0 3 0x14200 bored systqmp 34248 409091 0 0 3 0x14200 bored systq 73571 34645 0 0 3 0x40014200 bored softclock 7583 491258 0 0 3 0x40014200 idle0 28369 406658 0 0 3 0x14200 bored smr 1 433011 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9464 8374K 8382K 78643K 10614 0 0 pcb 23 9K 9K 78643K 105 0 0 rtable 100 3K 3K 78643K 198 0 0 ifaddr 43 11K 11K 78643K 58 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 111 0 0 iov 0 0K 24K 78643K 18 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1516 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 0K 0K 78643K 2 0 0 sem 10 0K 0K 78643K 10 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 332 0 0 proc 41 30K 46K 78643K 269 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 7 0 0 in_multi 33 2K 2K 78643K 35 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 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 174 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 72 20K 20K 78643K 1581 0 0 UVM aobj 10 2K 2K 78643K 10 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 10 0 0 NDP 7 0K 0K 78643K 15 0 0 temp 99 2349K 2415K 78643K 3603 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> 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 78 0 71 1 0 1 1 0 8 0 plimitpl 152 19 0 12 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 tcpqe 32 7 0 7 1 1 0 1 0 8 0 tcpcb 544 28 0 24 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 1 0 1 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 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 8 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2280 0 870 46 0 46 46 0 8 0 ffsino 240 2280 0 870 84 0 84 84 0 8 0 nchpl 144 2904 0 1278 61 0 61 61 0 8 0 uvmvnodes 72 2343 0 0 43 0 43 43 0 8 0 vnodes 200 2343 0 0 124 0 124 124 0 8 0 namei 1024 6999 0 6999 1 0 1 1 0 8 1 scxspl 192 7095 0 7095 8 7 1 6 0 8 1 sigapl 432 503 0 490 2 0 2 2 0 8 0 futexpl 56 3319 0 3319 1 0 1 1 0 8 1 knotepl 112 72 0 53 1 0 1 1 0 8 0 kqueuepl 104 32 0 30 1 0 1 1 0 8 0 pipepl 112 244 0 225 2 1 1 1 0 8 0 fdescpl 424 504 0 490 2 0 2 2 0 8 0 filepl 120 2187 0 2092 4 0 4 4 0 8 1 lockfpl 104 500 0 499 2 1 1 1 0 8 0 lockfspl 32 213 0 212 2 1 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 235 0 228 1 0 1 1 0 8 0 zombiepl 144 490 0 489 2 1 1 1 0 8 0 processpl 840 519 0 489 4 0 4 4 0 8 0 procpl 600 1005 0 968 4 0 4 4 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 156 0 139 4 1 3 3 0 8 1 mcl64k 65536 4 0 4 2 1 1 1 0 8 1 mcl12k 12288 3 0 3 1 1 0 1 0 8 0 mcl9k 9216 2 0 2 1 0 1 1 0 8 1 mcl8k 8192 2 0 2 2 1 1 1 0 8 1 mcl4k 4096 13 0 13 3 2 1 1 0 8 1 mcl2k2 2112 2 0 2 1 1 0 1 0 8 0 mcl2k 2048 47710 0 47672 12 6 6 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 78821 0 78745 9 3 6 7 0 8 0 bufpl 256 6067 0 1600 280 0 280 280 0 8 0 anonpl 16 47822 0 39119 38 2 36 36 0 62 0 amapchunkpl 152 2002 0 1922 5 1 4 5 0 158 0 amappl16 192 1540 0 1075 24 0 24 24 0 8 0 amappl15 184 206 0 201 1 0 1 1 0 8 0 amappl14 176 178 0 175 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 170 0 165 1 0 1 1 0 8 0 amappl11 152 176 0 164 1 0 1 1 0 8 0 amappl10 144 61 0 58 2 1 1 1 0 8 0 amappl9 136 495 0 492 1 0 1 1 0 8 0 amappl8 128 112 0 100 1 0 1 1 0 8 0 amappl7 120 27 0 24 1 0 1 1 0 8 0 amappl6 112 208 0 201 1 0 1 1 0 8 0 amappl5 104 206 0 196 1 0 1 1 0 8 0 amappl4 96 523 0 498 2 1 1 2 0 8 0 amappl3 88 437 0 428 1 0 1 1 0 8 0 amappl2 80 3493 0 3442 2 0 2 2 0 8 0 amappl1 72 18029 0 17617 27 18 9 19 0 8 0 amappl 72 1215 0 1183 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 9 0 0 1 0 1 1 0 8 0 uaddrrnd 24 504 0 490 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 504 0 490 1 0 1 1 0 8 0 vmmpekpl 168 7453 0 7435 2 0 2 2 0 8 0 vmmpepl 168 57857 0 56469 86 20 66 72 0 357 5 vmsppl 264 503 0 490 2 1 1 2 0 8 0 pdppl 4096 1014 0 980 5 0 5 5 0 8 0 pvpl 32 168126 0 156367 112 11 101 101 0 265 5 pmappl 192 503 0 490 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 417 0 15 12 0 12 12 0 8 0