panic: malloc: allocation too large, type = 2, size = 536870920 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *324071 16857 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(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,ffff800001962d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803bedec98,80085761,ffff800014a33e20,f,fffffd803f7c67e0,ffff800014a0a4e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f0bccb8,80085761,ffff800014a33e20,ffff800014a0a4e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a0a4e0,ffff800014a33f68,ffff800014a33f50) at sys_ioctl+0x638 syscall(ffff800014a34000) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ce407658010) at Xsyscall+0x128 end of kernel end trace frame: 0xce6914cb930, 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,ffff800001962d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803bedec98,80085761,ffff800014a33e20,f,fffffd803f7c67e0,ffff800014a0a4e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f0bccb8,80085761,ffff800014a33e20,ffff800014a0a4e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a0a4e0,ffff800014a33f68,ffff800014a33f50) at sys_ioctl+0x638 syscall(ffff800014a34000) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,ce407658010) at Xsyscall+0x128 end of kernel end trace frame: 0xce6914cb930, count: -10 ddb> show registers rdi 0xffffffff8161b027 db_enter+0x17 rsi 0x1cff __ALIGN_SIZE+0xcff rbp 0xffff800014a339f0 rbx 0xffff800014a33aa0 rdx 0x1d00 __ALIGN_SIZE+0xd00 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a339b0 r9 0x1 r10 0xffff80000399c480 r11 0xe74072306bbddc79 r12 0x3000000008 r13 0xffff800014a33a00 r14 0x100 r15 0x1 rip 0xffffffff8161b028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a339e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=324071 stat=onproc flags process=0 proc=4000000 pri=76, usrpri=76, nice=20 forw=0xffffffffffffffff, list=0xffff800014a0abe8,0xffff800014a0a040 process=0xffff8000ffff73c0 user=0xffff800014a2f000, vmspace=0xfffffd803f014e70 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 16857 31499 71291 0 2 0 syz-executor.1 *16857 324071 71291 0 7 0x4000000 syz-executor.1 52949 103963 96732 0 2 0 syz-executor.0 52949 267380 96732 0 3 0x4000080 fsleep syz-executor.0 52949 112072 96732 0 3 0x4000080 fsleep syz-executor.0 71291 79181 9232 0 3 0x82 nanosleep syz-executor.1 96732 492105 9232 0 3 0x82 nanosleep syz-executor.0 27180 485981 0 0 3 0x14200 bored sosplice 9232 218221 81556 0 3 0x82 thrsleep syz-fuzzer 9232 414877 81556 0 3 0x4000082 thrsleep syz-fuzzer 9232 57310 81556 0 3 0x4000082 thrsleep syz-fuzzer 9232 147975 81556 0 3 0x4000082 thrsleep syz-fuzzer 9232 345375 81556 0 3 0x4000082 thrsleep syz-fuzzer 9232 286591 81556 0 3 0x4000082 kqread syz-fuzzer 9232 148056 81556 0 3 0x4000082 thrsleep syz-fuzzer 9232 160508 81556 0 3 0x4000082 thrsleep syz-fuzzer 81556 88287 99325 0 3 0x10008a pause ksh 99325 286266 27697 0 3 0x92 select sshd 5794 424355 1 0 3 0x100083 ttyin getty 27697 466545 1 0 3 0x80 select sshd 77442 86852 41649 73 3 0x100090 kqread syslogd 41649 521391 1 0 3 0x100082 netio syslogd 4013 375078 1 77 3 0x100090 poll dhclient 91633 406706 1 0 3 0x80 poll dhclient 27717 150784 0 0 2 0x14200 zerothread 20767 43989 0 0 3 0x14200 aiodoned aiodoned 13418 285574 0 0 3 0x14200 syncer update 40120 452771 0 0 3 0x14200 cleaner cleaner 73895 114800 0 0 3 0x14200 reaper reaper 59852 103726 0 0 3 0x14200 pgdaemon pagedaemon 29344 39006 0 0 3 0x14200 bored crynlk 6030 522857 0 0 3 0x14200 bored crypto 20883 15573 0 0 3 0x40014200 acpi0 acpi0 91071 279279 0 0 3 0x14200 bored softnet 58983 165989 0 0 3 0x14200 bored systqmp 19993 378111 0 0 3 0x14200 bored systq 73359 62488 0 0 3 0x40014200 bored softclock 84449 88902 0 0 3 0x40014200 idle0 86159 245556 0 0 3 0x14200 bored smr 1 140465 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 9602 10487K 10488K 78643K 16300 0 0 pcb 23 9K 11K 78643K 4164 0 0 rtable 103 4K 4K 78643K 5536 0 0 ifaddr 86 27K 35K 78643K 2336 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 186 0 0 iov 0 0K 28K 78643K 1342 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1187 74K 75K 78643K 10216 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 112 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 1190 0 0 dirhash 15 2K 2K 78643K 15 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 12430 0 0 sigio 0 0K 0K 78643K 108 0 0 proc 42 30K 54K 78643K 3626 0 0 subproc 64 65538K 67586K 78643K 2277 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 850 0 0 in_multi 33 2K 2K 78643K 1017 0 0 ether_multi 1 0K 0K 78643K 51 0 0 mrt 2 0K 0K 78643K 20 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 132 583K 583K 78643K 132 0 0 exec 0 0K 1K 78643K 1208 0 0 pfkey data 0 0K 0K 78643K 8 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 104 22K 39K 78643K 29199 0 0 UVM aobj 130 6K 6K 78643K 149 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 373 0 0 NDP 21 0K 1K 78643K 731 0 0 temp 233 2361K 3000K 78643K 42665 0 0 kqueue 0 0K 0K 78643K 53 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 68 0 64 1 0 1 1 0 8 0 inpcbpl 280 3828 0 3821 2 1 1 2 0 8 0 plimitpl 152 307 0 300 1 0 1 1 0 8 0 rtentry 112 619 0 579 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 8 0 8 1 1 0 1 0 8 0 tcpcb 544 1415 0 1411 1 0 1 1 0 8 0 nd6 48 132 0 128 1 0 1 1 0 8 0 ppxss 1128 484 0 484 38 37 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2918 0 2727 21 8 13 13 0 8 0 art_table 32 2919 0 2727 2 0 2 2 0 8 0 art_node 16 616 0 582 1 0 1 1 0 8 0 semapl 112 1188 0 1178 1 0 1 1 0 8 0 shmpl 112 147 0 19 4 0 4 4 0 8 0 dirhash 1024 19 0 0 3 0 3 3 0 8 0 dino1pl 128 28709 0 26995 57 1 56 56 0 8 0 ffsino 240 28709 0 26995 101 0 101 101 0 8 0 nchpl 144 45998 0 44190 69 1 68 68 0 8 0 uvmvnodes 72 6989 0 0 128 0 128 128 0 8 0 vnodes 200 6989 0 0 368 0 368 368 0 8 0 namei 1024 149026 0 149026 6 5 1 1 0 8 1 scsiplug 64 25 0 25 16 15 1 1 0 8 1 scxspl 192 147316 0 147316 45 44 1 6 0 8 1 sigapl 432 12408 0 12394 2 0 2 2 0 8 0 futexpl 56 228934 0 228932 6 5 1 1 0 8 0 knotepl 112 2740 0 2721 1 0 1 1 0 8 0 kqueuepl 104 5031 0 5029 1 0 1 1 0 8 0 pipepl 112 5370 0 5351 14 13 1 2 0 8 0 fdescpl 424 12409 0 12394 2 0 2 2 0 8 0 filepl 120 79638 0 79541 12 8 4 5 0 8 1 lockfpl 104 2577 0 2577 9 8 1 1 0 8 1 lockfspl 32 2812 0 2812 9 8 1 1 0 8 1 sessionpl 112 81 0 71 1 0 1 1 0 8 0 pgrppl 48 181 0 171 1 0 1 1 0 8 0 ucredpl 96 25229 0 25222 1 0 1 1 0 8 0 zombiepl 144 12394 0 12394 3 2 1 1 0 8 1 processpl 840 12424 0 12394 4 0 4 4 0 8 0 procpl 600 27017 0 26977 7 3 4 4 0 8 0 sosppl 128 124 0 124 33 32 1 1 0 8 1 sockpl 384 7468 0 7451 19 15 4 4 0 8 2 mcl64k 65536 2515 0 2513 187 182 5 33 0 8 3 mcl16k 16384 37 0 37 23 23 0 1 0 8 0 mcl12k 12288 191 0 191 37 36 1 1 0 8 1 mcl9k 9216 127 0 127 41 40 1 1 0 8 1 mcl8k 8192 188 0 187 11 10 1 1 0 8 0 mcl4k 4096 2936 0 2936 19 18 1 1 0 8 1 mcl2k2 2112 49 0 49 31 31 0 1 0 8 0 mcl2k 2048 66557 0 66521 38 32 6 9 0 8 1 mtagpl 80 6 0 6 3 3 0 1 0 8 0 mbufpl 256 181273 0 181201 108 100 8 22 0 8 1 bufpl 256 33969 0 26918 441 0 441 441 0 8 0 anonpl 16 1092242 0 1084039 328 290 38 54 0 62 0 amapchunkpl 152 50220 0 50132 108 103 5 14 0 158 1 amappl16 192 61426 0 60956 351 326 25 36 0 8 1 amappl15 184 3527 0 3523 1 0 1 1 0 8 0 amappl14 176 1063 0 1061 3 2 1 1 0 8 0 amappl13 168 2600 0 2595 1 0 1 1 0 8 0 amappl12 160 1405 0 1404 2 1 1 1 0 8 0 amappl11 152 2642 0 2631 1 0 1 1 0 8 0 amappl10 144 2480 0 2477 1 0 1 1 0 8 0 amappl9 136 2210 0 2203 1 0 1 1 0 8 0 amappl8 128 1744 0 1710 4 2 2 2 0 8 0 amappl7 120 1765 0 1759 1 0 1 1 0 8 0 amappl6 112 1193 0 1183 1 0 1 1 0 8 0 amappl5 104 1069 0 1058 1 0 1 1 0 8 0 amappl4 96 11899 0 11871 1 0 1 1 0 8 0 amappl3 88 2048 0 2043 1 0 1 1 0 8 0 amappl2 80 112567 0 112505 2 0 2 2 0 8 0 amappl1 72 217685 0 217256 26 17 9 19 0 8 0 amappl 72 27715 0 27679 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 148 0 19 3 0 3 3 0 8 0 uaddrrnd 24 12409 0 12394 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 12409 0 12394 1 0 1 1 0 8 0 vmmpekpl 168 77037 0 77017 2 0 2 2 0 8 0 vmmpepl 168 1240570 0 1239061 379 300 79 83 0 357 10 vmsppl 264 12408 0 12394 6 5 1 2 0 8 0 pdppl 4096 24824 0 24788 5 0 5 5 0 8 0 pvpl 32 3364816 0 3353294 766 654 112 242 0 265 10 pmappl 192 12408 0 12394 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 967 0 380 19 1 18 18 0 8 0