panic: malloc: allocation too large, type = 2, size = 1207959560 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *421563 54204 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(48000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(9000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(9000000,ffff800000669000) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802a451ba8,80085761,ffff8000149f07b0,2,fffffd803f7c6780,ffff8000ffff9070) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361a8698,80085761,ffff8000149f07b0,ffff8000ffff9070) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff9070,ffff8000149f08f8,ffff8000149f08e0) at sys_ioctl+0x638 syscall(ffff8000149f0990) at syscall+0x541 Xsyscall(6,0,ffffffffffffff85,0,3,664439f8010) at Xsyscall+0x128 end of kernel end trace frame: 0x666d9bf15e0, 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 = 1207959560 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(48000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(9000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(9000000,ffff800000669000) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802a451ba8,80085761,ffff8000149f07b0,2,fffffd803f7c6780,ffff8000ffff9070) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361a8698,80085761,ffff8000149f07b0,ffff8000ffff9070) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff9070,ffff8000149f08f8,ffff8000149f08e0) at sys_ioctl+0x638 syscall(ffff8000149f0990) at syscall+0x541 Xsyscall(6,0,ffffffffffffff85,0,3,664439f8010) at Xsyscall+0x128 end of kernel end trace frame: 0x666d9bf15e0, count: -10 ddb> show registers rdi 0xffffffff812c72d7 db_enter+0x17 rsi 0x2d81 __ALIGN_SIZE+0x1d81 rbp 0xffff8000149f0380 rbx 0xffff8000149f0430 rdx 0x2d82 __ALIGN_SIZE+0x1d82 rcx 0xffff800001b3c000 rax 0xffff800001b3c000 r8 0xffff8000149f0340 r9 0x1 r10 0xffff800001b3b900 r11 0x9bc5cce436c368a r12 0x3000000008 r13 0xffff8000149f0390 r14 0x100 r15 0x1 rip 0xffffffff812c72d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f0370 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=421563 stat=onproc flags process=0 proc=4000000 pri=83, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84b8,0xffffffff8224cb48 process=0xffff800014963080 user=0xffff8000149eb000, vmspace=0xfffffd803f014420 estcpu=33, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 54204 457469 87317 0 2 0 syz-executor.1 *54204 421563 87317 0 7 0x4000000 syz-executor.1 87317 422117 26974 0 2 0x482 syz-executor.1 86296 458100 26974 0 2 0x482 syz-executor.0 35199 170279 0 0 3 0x14200 bored sosplice 78963 56437 1 0 3 0x100083 ttyin getty 26974 226847 16715 0 3 0x82 thrsleep syz-fuzzer 26974 382936 16715 0 3 0x4000082 thrsleep syz-fuzzer 26974 141857 16715 0 3 0x4000082 thrsleep syz-fuzzer 26974 511949 16715 0 3 0x4000082 thrsleep syz-fuzzer 26974 213759 16715 0 3 0x4000082 thrsleep syz-fuzzer 26974 421337 16715 0 3 0x4000082 kqread syz-fuzzer 26974 486051 16715 0 3 0x4000082 thrsleep syz-fuzzer 26974 507928 16715 0 3 0x4000082 thrsleep syz-fuzzer 16715 117439 22403 0 3 0x10008a pause ksh 22403 353568 45300 0 3 0x92 select sshd 45300 339163 1 0 3 0x80 select sshd 33662 140930 56840 73 3 0x100090 kqread syslogd 56840 417231 1 0 3 0x100082 netio syslogd 72613 338404 1 77 3 0x100090 poll dhclient 54818 121348 1 0 3 0x80 poll dhclient 26275 445299 0 0 2 0x14200 zerothread 82211 455935 0 0 3 0x14200 aiodoned aiodoned 77586 138914 0 0 3 0x14200 syncer update 98982 40736 0 0 3 0x14200 cleaner cleaner 87546 256681 0 0 3 0x14200 reaper reaper 47769 2237 0 0 3 0x14200 pgdaemon pagedaemon 89541 332269 0 0 3 0x14200 bored crynlk 32181 95640 0 0 3 0x14200 bored crypto 28934 499802 0 0 3 0x40014200 acpi0 acpi0 94797 431313 0 0 3 0x14200 bored softnet 36299 497169 0 0 3 0x14200 bored systqmp 13321 44729 0 0 3 0x14200 bored systq 75370 374369 0 0 3 0x40014200 bored softclock 27227 37852 0 0 3 0x40014200 idle0 18174 519276 0 0 3 0x14200 bored smr 1 494387 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 9471 6721K 6741K 78643K 10936 0 0 pcb 23 9K 10K 78643K 157 0 0 rtable 100 3K 3K 78643K 402 0 0 ifaddr 45 11K 12K 78643K 118 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 24 0 0 iov 0 0K 16K 78643K 30 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 1698 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 12 1K 1K 78643K 47 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 479 0 0 sigio 0 0K 0K 78643K 1 0 0 proc 41 30K 46K 78643K 374 0 0 subproc 64 65538K 67586K 78643K 242 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 28 0 0 in_multi 33 2K 2K 78643K 113 0 0 ether_multi 1 0K 0K 78643K 5 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 209 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 74 20K 38K 78643K 1810 0 0 UVM aobj 7 4K 4K 78643K 7 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 8 0 0 NDP 8 0K 0K 78643K 38 0 0 temp 107 2346K 2410K 78643K 4338 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 9 0 5 1 0 1 1 0 8 0 inpcbpl 280 98 0 91 1 0 1 1 0 8 0 plimitpl 152 27 0 20 1 0 1 1 0 8 0 rtentry 112 86 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 40 0 36 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 ppxss 1128 9 0 9 3 3 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 403 0 215 12 0 12 12 0 8 0 art_table 32 404 0 215 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semapl 112 43 0 33 1 0 1 1 0 8 0 shmpl 112 5 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2555 0 1136 46 0 46 46 0 8 0 ffsino 240 2555 0 1136 84 0 84 84 0 8 0 nchpl 144 3368 0 1742 61 0 61 61 0 8 0 uvmvnodes 72 2722 0 0 50 0 50 50 0 8 0 vnodes 200 2722 0 0 144 0 144 144 0 8 0 namei 1024 8696 0 8696 3 2 1 1 0 8 1 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 11402 0 11402 11 10 1 7 0 8 1 sigapl 432 635 0 622 2 0 2 2 0 8 0 futexpl 56 5111 0 5111 3 2 1 1 0 8 1 knotepl 112 192 0 173 1 0 1 1 0 8 0 kqueuepl 104 50 0 48 1 0 1 1 0 8 0 pipepl 112 250 0 231 2 1 1 1 0 8 0 fdescpl 424 636 0 622 2 0 2 2 0 8 0 filepl 120 3141 0 3046 5 1 4 4 0 8 1 lockfpl 104 54 0 54 3 3 0 1 0 8 0 lockfspl 32 21 0 21 3 3 0 1 0 8 0 sessionpl 112 23 0 13 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 276 0 269 1 0 1 1 0 8 0 zombiepl 144 622 0 621 2 1 1 1 0 8 0 processpl 840 651 0 621 4 0 4 4 0 8 0 procpl 600 1137 0 1099 5 1 4 4 0 8 1 sosppl 128 3 0 3 1 1 0 1 0 8 0 sockpl 384 228 0 211 4 2 2 3 0 8 0 mcl64k 65536 5 0 5 1 1 0 1 0 8 0 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 2 0 2 1 1 0 1 0 8 0 mcl9k 9216 3 0 3 1 1 0 1 0 8 0 mcl8k 8192 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 21 0 21 3 3 0 1 0 8 0 mcl2k 2048 48437 0 48402 15 10 5 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 81404 0 81325 11 5 6 7 0 8 0 bufpl 256 7300 0 1723 349 0 349 349 0 8 0 anonpl 16 60670 0 52985 53 13 40 52 0 62 4 amapchunkpl 152 2691 0 2611 14 10 4 14 0 158 0 amappl16 192 2348 0 1898 25 1 24 24 0 8 0 amappl15 184 49 0 45 1 0 1 1 0 8 0 amappl14 176 64 0 61 2 1 1 1 0 8 0 amappl13 168 32 0 28 1 0 1 1 0 8 0 amappl12 160 67 0 64 1 0 1 1 0 8 0 amappl11 152 20 0 8 1 0 1 1 0 8 0 amappl10 144 61 0 59 2 1 1 1 0 8 0 amappl9 136 875 0 869 1 0 1 1 0 8 0 amappl8 128 448 0 434 1 0 1 1 0 8 0 amappl7 120 38 0 33 1 0 1 1 0 8 0 amappl6 112 53 0 46 1 0 1 1 0 8 0 amappl5 104 172 0 162 1 0 1 1 0 8 0 amappl4 96 784 0 757 2 1 1 2 0 8 0 amappl3 88 168 0 163 1 0 1 1 0 8 0 amappl2 80 4488 0 4438 2 0 2 2 0 8 0 amappl1 72 20147 0 19727 24 14 10 19 0 8 0 amappl 72 1382 0 1350 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 6 0 0 1 0 1 1 0 8 0 uaddrrnd 24 636 0 622 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 636 0 622 1 0 1 1 0 8 0 vmmpekpl 168 7755 0 7736 2 0 2 2 0 8 0 vmmpepl 168 71219 0 69838 99 29 70 78 0 357 6 vmsppl 264 635 0 622 2 1 1 2 0 8 0 pdppl 4096 1278 0 1244 5 0 5 5 0 8 0 pvpl 32 243721 0 232910 245 43 202 237 0 265 103 pmappl 192 635 0 622 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 492 0 25 14 0 14 14 0 8 0