panic: malloc: allocation too large, type = 2, size = 5125713568 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *204083 11209 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(131842ea0,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(263085d3) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(263085d3,ffff800001942c00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80315ede60,80085761,ffff8000149be0c0,83,fffffd803f7c6a20,ffff800014a0c270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361b6b48,80085761,ffff8000149be0c0,ffff800014a0c270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a0c270,ffff8000149be208,ffff8000149be1f0) at sys_ioctl+0x638 syscall(ffff8000149be2a0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e56d5122010) at Xsyscall+0x128 end of kernel end trace frame: 0xe594f78caa0, 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 = 5125713568 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(131842ea0,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(263085d3) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(263085d3,ffff800001942c00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd80315ede60,80085761,ffff8000149be0c0,83,fffffd803f7c6a20,ffff800014a0c270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361b6b48,80085761,ffff8000149be0c0,ffff800014a0c270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800014a0c270,ffff8000149be208,ffff8000149be1f0) at sys_ioctl+0x638 syscall(ffff8000149be2a0) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,e56d5122010) at Xsyscall+0x128 end of kernel end trace frame: 0xe594f78caa0, count: -10 ddb> show registers rdi 0xffffffff81a24927 db_enter+0x17 rsi 0x1c62 __ALIGN_SIZE+0xc62 rbp 0xffff8000149bdc90 rbx 0xffff8000149bdd40 rdx 0x1c63 __ALIGN_SIZE+0xc63 rcx 0xffff800001980000 rax 0xffff800001980000 r8 0xffff8000149bdc50 r9 0x1 r10 0xffff800000930e40 r11 0x2f369c149b9cb399 r12 0x3000000008 r13 0xffff8000149bdca0 r14 0x100 r15 0x1 rip 0xffffffff81a24928 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149bdc80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=204083 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800014a0ce28,0xffffffff82253390 process=0xffff8000ffff6d30 user=0xffff8000149b9000, vmspace=0xfffffd803f014210 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 11209 520144 74769 0 2 0 syz-executor.1 *11209 204083 74769 0 7 0x4000000 syz-executor.1 80327 198940 55944 0 3 0x82 nanosleep syz-executor.0 74769 95363 55944 0 3 0x82 nanosleep syz-executor.1 97025 489937 1 0 3 0x100083 ttyin getty 28127 222108 0 0 3 0x14200 bored sosplice 55944 308041 31135 0 3 0x82 thrsleep syz-fuzzer 55944 450456 31135 0 3 0x4000082 thrsleep syz-fuzzer 55944 96067 31135 0 3 0x4000082 thrsleep syz-fuzzer 55944 15847 31135 0 3 0x4000082 thrsleep syz-fuzzer 55944 178844 31135 0 3 0x4000082 kqread syz-fuzzer 55944 164603 31135 0 3 0x4000082 thrsleep syz-fuzzer 55944 70492 31135 0 3 0x4000082 thrsleep syz-fuzzer 31135 425300 2264 0 3 0x10008a pause ksh 2264 143554 2994 0 3 0x92 select sshd 2994 407476 1 0 3 0x80 select sshd 39199 422020 90663 73 3 0x100090 kqread syslogd 90663 465252 1 0 3 0x100082 netio syslogd 9383 247689 1 77 3 0x100090 poll dhclient 52702 213218 1 0 3 0x80 poll dhclient 35601 126769 0 0 2 0x14200 zerothread 6571 195405 0 0 3 0x14200 aiodoned aiodoned 50836 55741 0 0 3 0x14200 syncer update 64127 302595 0 0 3 0x14200 cleaner cleaner 48768 149056 0 0 3 0x14200 reaper reaper 29888 45041 0 0 3 0x14200 pgdaemon pagedaemon 84067 453925 0 0 3 0x14200 bored crynlk 8867 281002 0 0 3 0x14200 bored crypto 83969 397968 0 0 3 0x40014200 acpi0 acpi0 62692 278824 0 0 3 0x14200 bored softnet 48404 69815 0 0 3 0x14200 bored systqmp 96038 138263 0 0 3 0x14200 bored systq 36711 516386 0 0 3 0x40014200 bored softclock 8735 240500 0 0 3 0x40014200 idle0 97009 13625 0 0 3 0x14200 bored smr 1 383590 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 9524 10461K 10465K 78643K 11196 0 0 pcb 23 9K 10K 78643K 849 0 0 rtable 100 3K 3K 78643K 961 0 0 ifaddr 62 15K 16K 78643K 351 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 50 0 0 iov 0 0K 16K 78643K 184 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1192 75K 75K 78643K 1971 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 19 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 192 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 1476 0 0 sigio 0 0K 0K 78643K 28 0 0 proc 42 30K 46K 78643K 737 0 0 subproc 64 65538K 67586K 78643K 514 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 223 0 0 in_multi 33 2K 2K 78643K 281 0 0 ether_multi 1 0K 0K 78643K 13 0 0 mrt 0 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 374 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 22K 78643K 4213 0 0 UVM aobj 68 7K 7K 78643K 72 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 72 0 0 NDP 13 0K 0K 78643K 111 0 0 temp 177 2359K 2431K 78643K 7844 0 0 kqueue 0 0K 0K 78643K 14 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 766 0 759 1 0 1 1 0 8 0 plimitpl 152 81 0 74 1 0 1 1 0 8 0 rtentry 112 158 0 118 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 278 0 274 1 0 1 1 0 8 0 nd6 48 30 0 26 1 0 1 1 0 8 0 ppxss 1128 49 0 49 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 738 0 547 12 0 12 12 0 8 0 art_table 32 739 0 547 2 0 2 2 0 8 0 art_node 16 157 0 123 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 2 1 0 1 1 0 8 0 semapl 112 188 0 178 1 0 1 1 0 8 0 shmpl 112 70 0 4 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3937 0 2467 48 0 48 48 0 8 0 ffsino 240 3937 0 2467 88 1 87 87 0 8 0 nchpl 144 6212 0 4534 63 0 63 63 0 8 0 uvmvnodes 72 4297 0 0 79 0 79 79 0 8 0 vnodes 200 4297 0 0 227 0 227 227 0 8 0 namei 1024 20668 0 20668 2 1 1 1 0 8 1 scsiplug 64 3 0 3 3 3 0 1 0 8 0 scxspl 192 21935 0 21935 12 9 3 6 0 8 3 sigapl 432 1611 0 1598 2 0 2 2 0 8 0 futexpl 56 24235 0 24235 1 0 1 1 0 8 1 knotepl 112 625 0 606 1 0 1 1 0 8 0 kqueuepl 104 413 0 411 1 0 1 1 0 8 0 pipepl 112 1014 0 995 4 3 1 2 0 8 0 fdescpl 424 1612 0 1598 2 0 2 2 0 8 0 filepl 120 10592 0 10497 5 1 4 5 0 8 1 lockfpl 104 379 0 378 2 1 1 1 0 8 0 lockfspl 32 251 0 250 2 1 1 1 0 8 0 sessionpl 112 34 0 24 1 0 1 1 0 8 0 pgrppl 48 56 0 46 1 0 1 1 0 8 0 ucredpl 96 2851 0 2844 1 0 1 1 0 8 0 zombiepl 144 1598 0 1597 2 1 1 1 0 8 0 processpl 840 1627 0 1597 4 0 4 4 0 8 0 procpl 600 3341 0 3304 4 0 4 4 0 8 0 sosppl 128 26 0 26 6 5 1 1 0 8 1 sockpl 384 1504 0 1487 3 0 3 3 0 8 1 mcl64k 65536 54 0 54 6 5 1 1 0 8 1 mcl16k 16384 8 0 8 4 4 0 1 0 8 0 mcl12k 12288 34 0 34 7 6 1 1 0 8 1 mcl9k 9216 29 0 29 6 5 1 1 0 8 1 mcl8k 8192 25 0 25 7 6 1 1 0 8 1 mcl4k 4096 100 0 100 3 2 1 1 0 8 1 mcl2k2 2112 11 0 11 4 4 0 1 0 8 0 mcl2k 2048 49373 0 49331 13 7 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 89633 0 89535 18 9 9 11 0 8 0 bufpl 256 10060 0 4401 354 0 354 354 0 8 0 anonpl 16 176146 0 169019 85 45 40 53 0 62 0 amapchunkpl 152 7139 0 7059 36 32 4 14 0 158 0 amappl16 192 8617 0 8141 90 64 26 36 0 8 1 amappl15 184 65 0 60 1 0 1 1 0 8 0 amappl14 176 336 0 332 2 1 1 1 0 8 0 amappl13 168 507 0 504 1 0 1 1 0 8 0 amappl12 160 200 0 197 1 0 1 1 0 8 0 amappl11 152 28 0 16 1 0 1 1 0 8 0 amappl10 144 344 0 343 2 1 1 1 0 8 0 amappl9 136 1111 0 1107 1 0 1 1 0 8 0 amappl8 128 715 0 698 1 0 1 1 0 8 0 amappl7 120 316 0 311 1 0 1 1 0 8 0 amappl6 112 64 0 57 1 0 1 1 0 8 0 amappl5 104 277 0 266 1 0 1 1 0 8 0 amappl4 96 1667 0 1641 2 1 1 2 0 8 0 amappl3 88 600 0 594 1 0 1 1 0 8 0 amappl2 80 13200 0 13148 2 0 2 2 0 8 0 amappl1 72 38101 0 37695 26 17 9 19 0 8 0 amappl 72 3643 0 3611 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 71 0 4 2 0 2 2 0 8 0 uaddrrnd 24 1612 0 1598 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1612 0 1598 1 0 1 1 0 8 0 vmmpekpl 168 14184 0 14163 2 0 2 2 0 8 0 vmmpepl 168 179863 0 178475 119 42 77 81 0 357 8 vmsppl 264 1611 0 1598 3 2 1 2 0 8 0 pdppl 4096 3230 0 3196 5 0 5 5 0 8 0 pvpl 32 570203 0 559922 241 93 148 202 0 265 48 pmappl 192 1611 0 1598 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 519 0 37 14 0 14 14 0 8 0