login: panic: malloc: allocation too large, type = 2, size = 671088672 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *442087 96584 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(28000020,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(5000003) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000003,ffff800004174700) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802f24bbe0,80085761,ffff8000149cbe00,82,fffffd803f7c6ae0,ffff8000149e2720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803b10c960,80085761,ffff8000149cbe00,ffff8000149e2720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e2720,ffff8000149cbf48,ffff8000149cbf30) at sys_ioctl+0x638 syscall(ffff8000149cbfe0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,c4f5cb1a010) at Xsyscall+0x128 end of kernel end trace frame: 0xc5246bcb910, 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 = 671088672 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(28000020,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(5000003) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5000003,ffff800004174700) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802f24bbe0,80085761,ffff8000149cbe00,82,fffffd803f7c6ae0,ffff8000149e2720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803b10c960,80085761,ffff8000149cbe00,ffff8000149e2720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e2720,ffff8000149cbf48,ffff8000149cbf30) at sys_ioctl+0x638 syscall(ffff8000149cbfe0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,c4f5cb1a010) at Xsyscall+0x128 end of kernel end trace frame: 0xc5246bcb910, count: -10 ddb> show registers rdi 0xffffffff81c4ed97 db_enter+0x17 rsi 0x1c0c __ALIGN_SIZE+0xc0c rbp 0xffff8000149cb9d0 rbx 0xffff8000149cba80 rdx 0x1c0d __ALIGN_SIZE+0xc0d rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff8000149cb990 r9 0x1 r10 0xffff80000453d300 r11 0x7067d35854856023 r12 0x3000000008 r13 0xffff8000149cb9e0 r14 0x100 r15 0x1 rip 0xffffffff81c4ed98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149cb9c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=442087 stat=onproc flags process=0 proc=4000000 pri=75, usrpri=75, nice=20 forw=0xffffffffffffffff, list=0xffff8000149e2270,0xffff8000149e2028 process=0xffff8000ffffa9e0 user=0xffff8000149c7000, vmspace=0xfffffd803f013738 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 72872 142628 95345 0 2 0 syz-executor.0 72872 14434 95345 0 2 0x4000000 syz-executor.0 96584 489918 74222 0 2 0 syz-executor.1 *96584 442087 74222 0 7 0x4000000 syz-executor.1 26878 258794 1 0 3 0x80 nanosleep init 74222 245382 499 0 3 0x82 nanosleep syz-executor.1 95345 327017 499 0 3 0x82 nanosleep syz-executor.0 70091 304904 0 0 3 0x14200 bored sosplice 499 482228 24367 0 3 0x82 thrsleep syz-fuzzer 499 235365 24367 0 3 0x4000082 thrsleep syz-fuzzer 499 113891 24367 0 3 0x4000082 thrsleep syz-fuzzer 499 383562 24367 0 3 0x4000082 kqread syz-fuzzer 499 335467 24367 0 3 0x4000082 thrsleep syz-fuzzer 499 7289 24367 0 3 0x4000082 thrsleep syz-fuzzer 499 208819 24367 0 3 0x4000082 thrsleep syz-fuzzer 24367 438701 14563 0 3 0x10008a pause ksh 14563 30808 86051 0 3 0x92 select sshd 86051 448530 1 0 3 0x80 select sshd 57786 192752 42077 73 3 0x100090 kqread syslogd 42077 32014 1 0 3 0x100082 netio syslogd 79932 385478 1 77 3 0x100090 poll dhclient 33771 334119 1 0 3 0x80 poll dhclient 84499 87431 0 0 2 0x14200 zerothread 26178 120749 0 0 3 0x14200 aiodoned aiodoned 46116 386351 0 0 3 0x14200 syncer update 4917 402856 0 0 3 0x14200 cleaner cleaner 81702 280365 0 0 3 0x14200 reaper reaper 72597 504134 0 0 3 0x14200 pgdaemon pagedaemon 46223 269137 0 0 3 0x14200 bored crynlk 14707 179765 0 0 3 0x14200 bored crypto 8584 316186 0 0 3 0x40014200 acpi0 acpi0 96853 134284 0 0 3 0x14200 bored softnet 93019 336674 0 0 3 0x14200 bored systqmp 22782 106613 0 0 3 0x14200 bored systq 75632 445861 0 0 3 0x40014200 bored softclock 52881 160212 0 0 3 0x40014200 idle0 37763 319692 0 0 3 0x14200 bored smr 1 400366 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 9533 6817K 6825K 78643K 11290 0 0 pcb 23 9K 11K 78643K 950 0 0 rtable 100 3K 4K 78643K 1041 0 0 ifaddr 68 15K 16K 78643K 386 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 50 0 0 iov 0 0K 28K 78643K 282 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1193 75K 75K 78643K 2147 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 20 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 237 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 1658 0 0 sigio 0 0K 0K 78643K 14 0 0 proc 35 22K 46K 78643K 749 0 0 subproc 64 65538K 67586K 78643K 513 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 155 0 0 in_multi 33 2K 2K 78643K 223 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 431 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 79 20K 29K 78643K 4786 0 0 UVM aobj 86 7K 7K 78643K 95 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 71 0 0 NDP 15 0K 0K 78643K 122 0 0 temp 191 2360K 2427K 78643K 8351 0 0 kqueue 0 0K 0K 78643K 28 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 17 0 13 1 0 1 1 0 8 0 inpcbpl 280 852 0 845 1 0 1 1 0 8 0 plimitpl 152 83 0 77 1 0 1 1 0 8 0 rtentry 112 160 0 120 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 317 0 313 1 0 1 1 0 8 0 nd6 48 30 0 26 1 0 1 1 0 8 0 ppxss 1128 48 0 48 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 745 0 554 12 0 12 12 0 8 0 art_table 32 746 0 554 2 0 2 2 0 8 0 art_node 16 157 0 123 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 2 1 0 1 1 0 8 0 semapl 112 235 0 225 1 0 1 1 0 8 0 shmpl 112 93 0 9 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 4300 0 2824 48 0 48 48 0 8 0 ffsino 240 4300 0 2824 88 1 87 87 0 8 0 nchpl 144 6894 0 5217 64 1 63 63 0 8 0 uvmvnodes 72 4673 0 0 85 0 85 85 0 8 0 vnodes 200 4673 0 0 246 0 246 246 0 8 0 namei 1024 22127 0 22126 2 1 1 1 0 8 0 scsiplug 64 5 0 5 3 3 0 1 0 8 0 scxspl 192 25078 0 25078 19 18 1 7 0 8 1 sigapl 432 1794 0 1780 2 0 2 2 0 8 0 futexpl 56 27670 0 27670 1 0 1 1 0 8 1 knotepl 112 576 0 557 2 1 1 2 0 8 0 kqueuepl 104 430 0 428 1 0 1 1 0 8 0 pipepl 112 1256 0 1237 6 5 1 2 0 8 0 fdescpl 424 1795 0 1780 2 0 2 2 0 8 0 filepl 120 12138 0 12044 5 1 4 5 0 8 1 lockfpl 104 521 0 520 2 1 1 1 0 8 0 lockfspl 32 524 0 523 2 1 1 1 0 8 0 sessionpl 112 34 0 25 1 0 1 1 0 8 0 pgrppl 48 58 0 49 1 0 1 1 0 8 0 ucredpl 96 2898 0 2891 1 0 1 1 0 8 0 zombiepl 144 1780 0 1780 2 1 1 1 0 8 1 processpl 840 1810 0 1780 4 0 4 4 0 8 0 procpl 600 3847 0 3809 4 0 4 4 0 8 0 sosppl 128 30 0 30 5 5 0 1 0 8 0 sockpl 384 1694 0 1677 4 1 3 4 0 8 1 mcl64k 65536 800 0 800 94 89 5 33 0 8 5 mcl16k 16384 5 0 5 3 2 1 1 0 8 1 mcl12k 12288 44 0 44 5 4 1 1 0 8 1 mcl9k 9216 22 0 22 8 7 1 1 0 8 1 mcl8k 8192 24 0 24 7 6 1 1 0 8 1 mcl4k 4096 110 0 110 3 2 1 1 0 8 1 mcl2k2 2112 11 0 11 5 5 0 1 0 8 0 mcl2k 2048 50070 0 50019 16 9 7 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 97745 0 97664 74 66 8 43 0 8 0 bufpl 256 11280 0 5614 355 0 355 355 0 8 0 anonpl 16 220515 0 211720 83 35 48 54 0 62 8 amapchunkpl 152 8397 0 8314 26 20 6 14 0 158 1 amappl16 192 10789 0 10301 104 71 33 37 0 8 8 amappl15 184 225 0 220 1 0 1 1 0 8 0 amappl14 176 136 0 132 2 1 1 1 0 8 0 amappl13 168 127 0 123 1 0 1 1 0 8 0 amappl12 160 305 0 305 2 2 0 1 0 8 0 amappl11 152 261 0 248 1 0 1 1 0 8 0 amappl10 144 425 0 425 4 4 0 1 0 8 0 amappl9 136 1126 0 1120 1 0 1 1 0 8 0 amappl8 128 711 0 692 1 0 1 1 0 8 0 amappl7 120 54 0 49 1 0 1 1 0 8 0 amappl6 112 196 0 187 1 0 1 1 0 8 0 amappl5 104 422 0 412 1 0 1 1 0 8 0 amappl4 96 1920 0 1894 2 1 1 2 0 8 0 amappl3 88 339 0 333 1 0 1 1 0 8 0 amappl2 80 14770 0 14713 2 0 2 2 0 8 0 amappl1 72 42114 0 41729 26 17 9 19 0 8 0 amappl 72 4168 0 4134 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 94 0 9 2 0 2 2 0 8 0 uaddrrnd 24 1795 0 1780 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1795 0 1780 1 0 1 1 0 8 0 vmmpekpl 168 15795 0 15775 2 0 2 2 0 8 0 vmmpepl 168 199397 0 197949 128 51 77 80 0 357 7 vmsppl 264 1794 0 1780 2 1 1 2 0 8 0 pdppl 4096 3596 0 3560 5 0 5 5 0 8 0 pvpl 32 654301 0 642420 244 68 176 184 0 265 73 pmappl 192 1794 0 1780 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 666 0 178 15 0 15 15 0 8 0