panic: malloc: allocation too large, type = 2, size = 1073741848 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *260765 38214 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(40000018,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(8000002) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000002,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803545a378,80085761,ffff800014a1cd90,82,fffffd803f7c6b40,ffff8000ffff2270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803950c000,80085761,ffff800014a1cd90,ffff8000ffff2270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2270,ffff800014a1ced8,ffff800014a1cec0) at sys_ioctl+0x638 syscall(ffff800014a1cf70) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,29f07479010) at Xsyscall+0x128 end of kernel end trace frame: 0x2a13ddfc820, 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 = 1073741848 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(40000018,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(8000002) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000002,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd803545a378,80085761,ffff800014a1cd90,82,fffffd803f7c6b40,ffff8000ffff2270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803950c000,80085761,ffff800014a1cd90,ffff8000ffff2270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff2270,ffff800014a1ced8,ffff800014a1cec0) at sys_ioctl+0x638 syscall(ffff800014a1cf70) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,29f07479010) at Xsyscall+0x128 end of kernel end trace frame: 0x2a13ddfc820, count: -10 ddb> show registers rdi 0xffffffff810e7007 db_enter+0x17 rsi 0x1c7d __ALIGN_SIZE+0xc7d rbp 0xffff800014a1c960 rbx 0xffff800014a1ca10 rdx 0x1c7e __ALIGN_SIZE+0xc7e rcx 0xffff80000433e000 rax 0xffff80000433e000 r8 0xffff800014a1c920 r9 0x1 r10 0xffff80000433d5c0 r11 0x9e739e4c2d045b15 r12 0x3000000008 r13 0xffff800014a1c970 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1c950 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=260765 stat=onproc flags process=0 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2018,0xffff8000ffff2e38 process=0xffff8000ffff6010 user=0xffff800014a18000, vmspace=0xfffffd803f013c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 81382 56760 34184 0 2 0 syz-executor.1 38214 493747 9333 0 2 0 syz-executor.0 *38214 260765 9333 0 7 0x4000000 syz-executor.0 91601 81804 0 0 3 0x14200 bored sosplice 9333 214751 51483 0 3 0x82 nanosleep syz-executor.0 34184 31781 51483 0 3 0x82 nanosleep syz-executor.1 51483 346647 92333 0 3 0x82 thrsleep syz-fuzzer 51483 234948 92333 0 3 0x4000082 thrsleep syz-fuzzer 51483 297323 92333 0 3 0x4000082 thrsleep syz-fuzzer 51483 274785 92333 0 3 0x4000082 thrsleep syz-fuzzer 51483 447756 92333 0 3 0x4000082 kqread syz-fuzzer 51483 224518 92333 0 3 0x4000082 thrsleep syz-fuzzer 51483 146594 92333 0 3 0x4000082 thrsleep syz-fuzzer 51483 54463 92333 0 3 0x4000082 thrsleep syz-fuzzer 92333 223536 80522 0 3 0x10008a pause ksh 80522 274545 99528 0 3 0x92 select sshd 2600 305023 1 0 3 0x100083 ttyin getty 99528 102144 1 0 3 0x80 select sshd 98595 251410 96152 73 3 0x100090 kqread syslogd 96152 418091 1 0 3 0x100082 netio syslogd 40843 479472 1 77 3 0x100090 poll dhclient 99256 263911 1 0 3 0x80 poll dhclient 3073 18278 0 0 2 0x14200 zerothread 31081 25186 0 0 3 0x14200 aiodoned aiodoned 21203 66793 0 0 3 0x14200 syncer update 113 18173 0 0 3 0x14200 cleaner cleaner 56508 31540 0 0 3 0x14200 reaper reaper 14794 34424 0 0 3 0x14200 pgdaemon pagedaemon 36842 520694 0 0 3 0x14200 bored crynlk 1496 502907 0 0 3 0x14200 bored crypto 89760 501826 0 0 3 0x40014200 acpi0 acpi0 49729 386866 0 0 3 0x14200 bored softnet 53690 299886 0 0 3 0x14200 bored systqmp 47356 513599 0 0 3 0x14200 bored systq 97123 511038 0 0 3 0x40014200 bored softclock 88616 226972 0 0 3 0x40014200 idle0 41376 237662 0 0 3 0x14200 bored smr 1 124043 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 9478 6339K 6348K 78643K 10699 0 0 pcb 23 9K 10K 78643K 271 0 0 rtable 100 3K 3K 78643K 299 0 0 ifaddr 48 11K 12K 78643K 101 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 16 0 0 iov 0 0K 16K 78643K 71 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1196 75K 75K 78643K 1377 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 7 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 42 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 25K 78643K 311 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 42 30K 46K 78643K 296 0 0 subproc 64 65538K 69634K 78643K 102 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 37 0 0 in_multi 33 2K 2K 78643K 59 0 0 ether_multi 1 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 60 265K 265K 78643K 60 0 0 exec 0 0K 1K 78643K 192 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 76 20K 25K 78643K 1512 0 0 UVM aobj 19 2K 2K 78643K 19 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 25 0 0 NDP 9 0K 0K 78643K 29 0 0 temp 118 2347K 2411K 78643K 3791 0 0 kqueue 0 0K 0K 78643K 8 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 197 0 190 1 0 1 1 0 8 0 plimitpl 152 24 0 17 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 58 0 54 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 7 0 7 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 229 0 41 12 0 12 12 0 8 0 art_table 32 230 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 40 0 30 1 0 1 1 0 8 0 shmpl 112 17 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1966 0 549 46 0 46 46 0 8 0 ffsino 240 1966 0 549 84 0 84 84 0 8 0 nchpl 144 2612 0 985 61 0 61 61 0 8 0 uvmvnodes 72 2049 0 0 38 0 38 38 0 8 0 vnodes 200 2049 0 0 108 0 108 108 0 8 0 namei 1024 7152 0 7152 2 1 1 1 0 8 1 scxspl 192 8033 0 8033 12 11 1 6 0 8 1 sigapl 432 478 0 464 2 0 2 2 0 8 0 futexpl 56 5070 0 5070 1 0 1 1 0 8 1 knotepl 112 161 0 142 1 0 1 1 0 8 0 kqueuepl 104 87 0 85 1 0 1 1 0 8 0 pipepl 112 406 0 387 4 2 2 2 0 8 1 fdescpl 424 479 0 464 2 0 2 2 0 8 0 filepl 120 2931 0 2836 4 0 4 4 0 8 1 lockfpl 104 132 0 131 2 1 1 1 0 8 0 lockfspl 32 142 0 141 2 1 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 20 0 10 1 0 1 1 0 8 0 ucredpl 96 553 0 546 1 0 1 1 0 8 0 zombiepl 144 464 0 464 2 1 1 1 0 8 1 processpl 840 494 0 464 4 0 4 4 0 8 0 procpl 600 892 0 854 4 0 4 4 0 8 0 sosppl 128 4 0 4 1 0 1 1 0 8 1 sockpl 384 411 0 394 3 0 3 3 0 8 1 mcl64k 65536 268 0 268 33 20 13 32 0 8 13 mcl12k 12288 15 0 15 1 0 1 1 0 8 1 mcl9k 9216 6 0 6 3 2 1 1 0 8 1 mcl8k 8192 9 0 9 1 0 1 1 0 8 1 mcl4k 4096 25 0 25 2 1 1 1 0 8 1 mcl2k 2048 47763 0 47724 13 7 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 80206 0 80137 25 18 7 22 0 8 0 bufpl 256 6843 0 2367 280 0 280 280 0 8 0 anonpl 16 56277 0 48022 54 14 40 52 0 62 3 amapchunkpl 152 2078 0 1987 10 5 5 9 0 158 0 amappl16 192 2135 0 1668 37 10 27 35 0 8 3 amappl15 184 52 0 47 1 0 1 1 0 8 0 amappl14 176 102 0 101 2 1 1 1 0 8 0 amappl13 168 27 0 24 1 0 1 1 0 8 0 amappl12 160 233 0 230 1 0 1 1 0 8 0 amappl11 152 21 0 9 1 0 1 1 0 8 0 amappl10 144 121 0 117 2 1 1 1 0 8 0 amappl9 136 494 0 491 1 0 1 1 0 8 0 amappl8 128 117 0 104 1 0 1 1 0 8 0 amappl7 120 92 0 86 1 0 1 1 0 8 0 amappl6 112 55 0 47 1 0 1 1 0 8 0 amappl5 104 446 0 434 1 0 1 1 0 8 0 amappl4 96 576 0 551 2 1 1 2 0 8 0 amappl3 88 218 0 213 1 0 1 1 0 8 0 amappl2 80 3209 0 3156 2 0 2 2 0 8 0 amappl1 72 17507 0 17090 26 17 9 19 0 8 0 amappl 72 1120 0 1085 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 18 0 0 1 0 1 1 0 8 0 uaddrrnd 24 479 0 464 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 479 0 464 1 0 1 1 0 8 0 vmmpekpl 168 7404 0 7385 1 0 1 1 0 8 0 vmmpepl 168 56015 0 54571 91 19 72 77 0 357 7 vmsppl 264 478 0 464 2 1 1 2 0 8 0 pdppl 4096 964 0 928 6 1 5 6 0 8 0 pvpl 32 180487 0 169094 141 19 122 134 0 265 24 pmappl 192 478 0 464 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 465 0 50 13 0 13 13 0 8 0