login: panic: malloc: allocation too large, type = 2, size = 536870920 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *169650 20944 0 0 0x4000000 0 syz-executor.0 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(20000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(4000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(4000000,ffff800001987d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d98f178,80085761,ffff800014a2a8b0,f,fffffd803f7c67e0,ffff8000ffff3c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803d34db40,80085761,ffff800014a2a8b0,ffff8000ffff3c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3c38,ffff800014a2a9f8,ffff800014a2a9e0) at sys_ioctl+0x638 syscall(ffff800014a2aa90) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,9f8f891b010) at Xsyscall+0x128 end of kernel end trace frame: 0x9fb45f21e50, 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 = 536870920 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(20000008,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(4000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(4000000,ffff800001987d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802d98f178,80085761,ffff800014a2a8b0,f,fffffd803f7c67e0,ffff8000ffff3c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803d34db40,80085761,ffff800014a2a8b0,ffff8000ffff3c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3c38,ffff800014a2a9f8,ffff800014a2a9e0) at sys_ioctl+0x638 syscall(ffff800014a2aa90) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,9f8f891b010) at Xsyscall+0x128 end of kernel end trace frame: 0x9fb45f21e50, count: -10 ddb> show registers rdi 0xffffffff81a24927 db_enter+0x17 rsi 0x1e43 __ALIGN_SIZE+0xe43 rbp 0xffff800014a2a480 rbx 0xffff800014a2a530 rdx 0x1e44 __ALIGN_SIZE+0xe44 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a2a440 r9 0x1 r10 0xffff80000092c8c0 r11 0x82cf08cac6975c63 r12 0x3000000008 r13 0xffff800014a2a490 r14 0x100 r15 0x1 rip 0xffffffff81a24928 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a2a470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=169650 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff3788,0xffffffff82253390 process=0xffff8000ffff7708 user=0xffff800014a25000, vmspace=0xfffffd803f014738 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 20944 468520 59454 0 2 0 syz-executor.0 *20944 169650 59454 0 7 0x4000000 syz-executor.0 96448 107873 1 0 3 0x100083 ttyin getty 20762 460819 32749 0 2 0x2 syz-executor.1 59454 230071 32749 0 2 0x482 syz-executor.0 76330 309966 0 0 3 0x14200 bored sosplice 32749 115721 72710 0 3 0x82 kqread syz-fuzzer 32749 400456 72710 0 3 0x4000082 nanosleep syz-fuzzer 32749 5450 72710 0 3 0x4000082 thrsleep syz-fuzzer 32749 8851 72710 0 3 0x4000082 thrsleep syz-fuzzer 32749 280698 72710 0 3 0x4000082 thrsleep syz-fuzzer 32749 472730 72710 0 3 0x4000082 thrsleep syz-fuzzer 32749 239947 72710 0 3 0x4000082 thrsleep syz-fuzzer 32749 189298 72710 0 3 0x4000082 thrsleep syz-fuzzer 72710 348930 26965 0 3 0x10008a pause ksh 26965 368501 48273 0 3 0x92 select sshd 48273 179998 1 0 3 0x80 select sshd 79810 146610 13715 73 3 0x100090 kqread syslogd 13715 494084 1 0 3 0x100082 netio syslogd 30849 392584 1 77 3 0x100090 poll dhclient 9932 66284 1 0 3 0x80 poll dhclient 17713 486722 0 0 2 0x14200 zerothread 355 405350 0 0 3 0x14200 aiodoned aiodoned 69148 326547 0 0 3 0x14200 syncer update 55924 460969 0 0 3 0x14200 cleaner cleaner 74679 386092 0 0 3 0x14200 reaper reaper 88292 90044 0 0 3 0x14200 pgdaemon pagedaemon 85075 94887 0 0 3 0x14200 bored crynlk 88366 316094 0 0 3 0x14200 bored crypto 89782 209930 0 0 3 0x40014200 acpi0 acpi0 56464 317487 0 0 3 0x14200 bored softnet 84991 10141 0 0 3 0x14200 bored systqmp 13334 316583 0 0 3 0x14200 bored systq 41804 499398 0 0 3 0x40014200 bored softclock 81002 487141 0 0 3 0x40014200 idle0 87848 148929 0 0 3 0x14200 bored smr 1 464772 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 9536 6363K 6366K 78643K 11486 0 0 pcb 23 9K 10K 78643K 1133 0 0 rtable 103 3K 4K 78643K 1329 0 0 ifaddr 69 16K 16K 78643K 453 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 61 0 0 iov 0 0K 24K 78643K 319 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 2834 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 41 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 332 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 2208 0 0 sigio 0 0K 0K 78643K 34 0 0 proc 42 30K 46K 78643K 967 0 0 subproc 64 65538K 67586K 78643K 774 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 305 0 0 in_multi 33 2K 2K 78643K 379 0 0 ether_multi 1 0K 0K 78643K 24 0 0 mrt 0 0K 0K 78643K 6 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 108 477K 477K 78643K 108 0 0 exec 0 0K 1K 78643K 480 0 0 pfkey data 0 0K 0K 78643K 2 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 78 20K 29K 78643K 6197 0 0 UVM aobj 118 7K 7K 78643K 144 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 112 0 0 NDP 15 0K 0K 78643K 151 0 0 temp 192 2360K 2488K 78643K 10223 0 0 kqueue 0 0K 0K 78643K 22 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 24 0 20 1 0 1 1 0 8 0 inpcbpl 280 1152 0 1145 1 0 1 1 0 8 0 plimitpl 152 101 0 94 1 0 1 1 0 8 0 rtentry 112 225 0 185 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 440 0 436 1 0 1 1 0 8 0 nd6 48 44 0 40 1 0 1 1 0 8 0 ppxss 1128 58 0 57 8 7 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1041 0 855 12 0 12 12 0 8 0 art_table 32 1042 0 855 2 0 2 2 0 8 0 art_node 16 220 0 186 1 0 1 1 0 8 0 sysvmsgpl 40 26 0 9 2 1 1 1 0 8 0 semapl 112 328 0 318 1 0 1 1 0 8 0 shmpl 112 142 0 26 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5589 0 4086 49 0 49 49 0 8 0 ffsino 240 5589 0 4086 89 0 89 89 0 8 0 nchpl 144 8893 0 7188 65 1 64 64 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 28553 0 28552 2 1 1 1 0 8 0 scsiplug 64 5 0 5 5 5 0 1 0 8 0 scxspl 192 30937 0 30937 18 17 1 6 0 8 1 sigapl 432 2323 0 2310 2 0 2 2 0 8 0 futexpl 56 37290 0 37290 1 0 1 1 0 8 1 knotepl 112 970 0 951 1 0 1 1 0 8 0 kqueuepl 104 686 0 684 1 0 1 1 0 8 0 pipepl 112 1526 0 1507 3 2 1 2 0 8 0 fdescpl 424 2324 0 2310 2 0 2 2 0 8 0 filepl 120 15228 0 15133 5 1 4 5 0 8 1 lockfpl 104 853 0 853 2 1 1 1 0 8 1 lockfspl 32 1063 0 1063 2 1 1 1 0 8 1 sessionpl 112 42 0 32 1 0 1 1 0 8 0 pgrppl 48 70 0 60 1 0 1 1 0 8 0 ucredpl 96 3942 0 3935 1 0 1 1 0 8 0 zombiepl 144 2310 0 2310 2 1 1 1 0 8 1 processpl 840 2339 0 2310 4 0 4 4 0 8 0 procpl 600 5146 0 5109 4 0 4 4 0 8 0 sosppl 128 23 0 23 9 9 0 1 0 8 0 sockpl 384 2129 0 2112 4 1 3 4 0 8 1 mcl64k 65536 302 0 302 38 38 0 29 0 8 0 mcl16k 16384 12 0 12 8 7 1 1 0 8 1 mcl12k 12288 56 0 56 8 8 0 1 0 8 0 mcl9k 9216 37 0 37 11 10 1 1 0 8 1 mcl8k 8192 43 0 43 13 12 1 1 0 8 1 mcl4k 4096 126 0 126 7 6 1 1 0 8 1 mcl2k2 2112 12 0 12 7 7 0 1 0 8 0 mcl2k 2048 50987 0 50948 13 7 6 11 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 96808 0 96740 34 26 8 20 0 8 1 bufpl 256 11517 0 6789 296 0 296 296 0 8 0 anonpl 16 254582 0 245624 129 81 48 53 0 62 9 amapchunkpl 152 10455 0 10375 37 26 11 11 0 158 7 amappl16 192 12872 0 12376 130 100 30 37 0 8 5 amappl15 184 307 0 303 1 0 1 1 0 8 0 amappl14 176 576 0 571 2 1 1 1 0 8 0 amappl13 168 208 0 203 1 0 1 1 0 8 0 amappl12 160 807 0 804 5 4 1 1 0 8 0 amappl11 152 287 0 276 1 0 1 1 0 8 0 amappl10 144 243 0 241 2 1 1 1 0 8 0 amappl9 136 1201 0 1198 1 0 1 1 0 8 0 amappl8 128 773 0 753 1 0 1 1 0 8 0 amappl7 120 141 0 135 1 0 1 1 0 8 0 amappl6 112 324 0 315 1 0 1 1 0 8 0 amappl5 104 773 0 762 1 0 1 1 0 8 0 amappl4 96 2141 0 2114 2 1 1 2 0 8 0 amappl3 88 930 0 923 1 0 1 1 0 8 0 amappl2 80 19325 0 19275 2 0 2 2 0 8 0 amappl1 72 51869 0 51462 26 17 9 19 0 8 0 amappl 72 5500 0 5468 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 143 0 26 2 0 2 2 0 8 0 uaddrrnd 24 2324 0 2310 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2324 0 2310 1 0 1 1 0 8 0 vmmpekpl 168 19344 0 19323 2 0 2 2 0 8 0 vmmpepl 168 254708 0 253291 150 78 72 82 0 357 1 vmsppl 264 2323 0 2310 5 4 1 2 0 8 0 pdppl 4096 4654 0 4620 6 1 5 6 0 8 0 pvpl 32 742898 0 730835 263 134 129 139 0 265 27 pmappl 192 2323 0 2310 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 525 0 100 13 0 13 13 0 8 0