panic: malloc: allocation too large, type = 2, size = 16986736000 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *245272 16430 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(3f47d0580,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(7e8fa0af) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7e8fa0af,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8004598ca8,80085761,ffff800014a20430,3,fffffd803f7c6960,ffff8000ffff3c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803cb8c708,80085761,ffff800014a20430,ffff8000ffff3c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3c38,ffff800014a20578,ffff800014a20560) at sys_ioctl+0x638 syscall(ffff800014a20610) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,220b65b6010) at Xsyscall+0x128 end of kernel end trace frame: 0x222b8036da0, 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 = 16986736000 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(3f47d0580,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(7e8fa0af) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(7e8fa0af,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8004598ca8,80085761,ffff800014a20430,3,fffffd803f7c6960,ffff8000ffff3c38) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803cb8c708,80085761,ffff800014a20430,ffff8000ffff3c38) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3c38,ffff800014a20578,ffff800014a20560) at sys_ioctl+0x638 syscall(ffff800014a20610) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,220b65b6010) at Xsyscall+0x128 end of kernel end trace frame: 0x222b8036da0, count: -10 ddb> show registers rdi 0xffffffff81696f17 db_enter+0x17 rsi 0x1eef __ALIGN_SIZE+0xeef rbp 0xffff800014a20000 rbx 0xffff800014a200b0 rdx 0x1ef0 __ALIGN_SIZE+0xef0 rcx 0xffff80000093b000 rax 0xffff80000093b000 r8 0xffff800014a1ffc0 r9 0x1 r10 0xffff80000193c5c0 r11 0xdbedb15f1392cc9a r12 0x3000000008 r13 0xffff800014a20010 r14 0x100 r15 0x1 rip 0xffffffff81696f18 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1fff0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=245272 stat=onproc flags process=0 proc=4000000 pri=74, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2bd0,0xffff8000ffff3798 process=0xffff8000ffff66a0 user=0xffff800014a1b000, vmspace=0xfffffd803f013a50 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 16430 182899 9917 0 2 0 syz-executor.1 *16430 245272 9917 0 7 0x4000000 syz-executor.1 16430 163595 9917 0 3 0x4000080 fsleep syz-executor.1 9917 518675 52827 0 2 0x482 syz-executor.1 90847 121246 0 0 3 0x14200 bored sosplice 20587 440967 52827 0 3 0x2 biowait syz-executor.0 52827 81697 93386 0 3 0x82 kqread syz-fuzzer 52827 21797 93386 0 3 0x4000082 nanosleep syz-fuzzer 52827 514037 93386 0 3 0x4000082 thrsleep syz-fuzzer 52827 163240 93386 0 3 0x4000082 thrsleep syz-fuzzer 52827 391185 93386 0 3 0x4000082 thrsleep syz-fuzzer 52827 409685 93386 0 3 0x4000082 thrsleep syz-fuzzer 52827 52707 93386 0 3 0x4000082 thrsleep syz-fuzzer 52827 277640 93386 0 3 0x4000082 thrsleep syz-fuzzer 93386 231557 63890 0 3 0x10008a pause ksh 63890 55351 97569 0 3 0x92 select sshd 88458 24793 1 0 3 0x100083 ttyin getty 97569 37627 1 0 3 0x80 select sshd 58763 57371 26983 73 3 0x100090 kqread syslogd 26983 172236 1 0 3 0x100082 netio syslogd 27291 344584 1 77 3 0x100090 poll dhclient 27520 280124 1 0 3 0x80 poll dhclient 7212 360863 0 0 2 0x14200 zerothread 10670 294451 0 0 3 0x14200 aiodoned aiodoned 8903 23485 0 0 3 0x14200 syncer update 83858 72288 0 0 3 0x14200 cleaner cleaner 58732 161078 0 0 3 0x14200 reaper reaper 23393 416001 0 0 3 0x14200 pgdaemon pagedaemon 46772 150738 0 0 3 0x14200 bored crynlk 77624 75788 0 0 3 0x14200 bored crypto 18489 326259 0 0 3 0x40014200 acpi0 acpi0 80190 402934 0 0 3 0x14200 bored softnet 62503 454301 0 0 3 0x14200 bored systqmp 66875 504034 0 0 3 0x14200 bored systq 98017 60974 0 0 3 0x40014200 bored softclock 16488 465249 0 0 3 0x40014200 idle0 34807 428117 0 0 3 0x14200 bored smr 1 19017 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 9491 6347K 6353K 78643K 10845 0 0 pcb 23 9K 10K 78643K 444 0 0 rtable 100 3K 4K 78643K 408 0 0 ifaddr 52 12K 13K 78643K 155 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 33 0 0 iov 0 0K 32K 78643K 123 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1191 75K 75K 78643K 1627 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 10 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 90 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 25K 78643K 683 0 0 sigio 1 0K 0K 78643K 12 0 0 proc 41 30K 54K 78643K 363 0 0 subproc 64 65538K 67586K 78643K 138 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 78 0 0 in_multi 33 2K 2K 78643K 80 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 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 235 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 21K 78643K 2447 0 0 UVM aobj 37 2K 2K 78643K 45 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 20 0 0 NDP 10 0K 0K 78643K 43 0 0 temp 155 2355K 2420K 78643K 4925 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 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 374 0 367 1 0 1 1 0 8 0 plimitpl 152 37 0 30 1 0 1 1 0 8 0 rtentry 112 61 0 21 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 16 0 16 1 1 0 1 0 8 0 tcpcb 544 138 0 134 1 0 1 1 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 ppxss 1128 19 0 19 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 269 0 82 12 0 12 12 0 8 0 art_table 32 270 0 82 2 0 2 2 0 8 0 art_node 16 58 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 4 1 0 1 1 0 8 0 semapl 112 88 0 78 1 0 1 1 0 8 0 shmpl 112 43 0 8 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2717 0 1307 46 0 46 46 0 8 0 ffsino 240 2717 0 1307 84 0 84 84 0 8 0 nchpl 144 3950 0 2319 61 0 61 61 0 8 0 uvmvnodes 72 2835 0 0 52 0 52 52 0 8 0 vnodes 200 2835 0 0 150 0 150 150 0 8 0 namei 1024 11638 0 11638 2 1 1 1 0 8 1 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 11541 0 11540 15 14 1 6 0 8 0 sigapl 432 847 0 834 2 0 2 2 0 8 0 futexpl 56 11935 0 11934 1 0 1 1 0 8 0 knotepl 112 254 0 235 1 0 1 1 0 8 0 kqueuepl 104 186 0 184 1 0 1 1 0 8 0 pipepl 112 506 0 487 3 2 1 2 0 8 0 fdescpl 424 848 0 834 2 0 2 2 0 8 0 filepl 120 5631 0 5536 4 0 4 4 0 8 1 lockfpl 104 317 0 317 2 1 1 1 0 8 1 lockfspl 32 467 0 467 2 1 1 1 0 8 1 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 1598 0 1591 1 0 1 1 0 8 0 zombiepl 144 834 0 834 2 1 1 1 0 8 1 processpl 840 863 0 834 4 0 4 4 0 8 0 procpl 600 1793 0 1755 4 0 4 4 0 8 0 sosppl 128 8 0 8 3 3 0 1 0 8 0 sockpl 384 749 0 732 3 0 3 3 0 8 1 mcl64k 65536 270 0 270 29 28 1 29 0 8 1 mcl12k 12288 19 0 19 4 3 1 1 0 8 1 mcl9k 9216 11 0 11 4 4 0 1 0 8 0 mcl8k 8192 10 0 10 5 4 1 1 0 8 1 mcl4k 4096 54 0 54 2 1 1 1 0 8 1 mcl2k2 2112 3 0 3 3 2 1 1 0 8 1 mcl2k 2048 48567 0 48529 13 7 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 83120 0 83056 22 15 7 20 0 8 1 bufpl 256 7590 0 3110 281 0 281 281 0 8 0 anonpl 16 86554 0 77687 56 16 40 52 0 62 2 amapchunkpl 152 3396 0 3314 8 4 4 5 0 158 0 amappl16 192 3958 0 3482 41 16 25 36 0 8 0 amappl15 184 184 0 180 1 0 1 1 0 8 0 amappl14 176 24 0 23 2 1 1 1 0 8 0 amappl13 168 27 0 24 1 0 1 1 0 8 0 amappl12 160 17 0 13 1 0 1 1 0 8 0 amappl11 152 153 0 142 1 0 1 1 0 8 0 amappl10 144 576 0 571 2 1 1 1 0 8 0 amappl9 136 554 0 550 1 0 1 1 0 8 0 amappl8 128 122 0 108 1 0 1 1 0 8 0 amappl7 120 545 0 540 1 0 1 1 0 8 0 amappl6 112 90 0 84 1 0 1 1 0 8 0 amappl5 104 129 0 119 1 0 1 1 0 8 0 amappl4 96 1038 0 1010 2 1 1 2 0 8 0 amappl3 88 145 0 140 1 0 1 1 0 8 0 amappl2 80 6609 0 6558 2 0 2 2 0 8 0 amappl1 72 24356 0 23939 25 15 10 19 0 8 0 amappl 72 2027 0 1994 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 44 0 8 1 0 1 1 0 8 0 uaddrrnd 24 848 0 834 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 848 0 834 1 0 1 1 0 8 0 vmmpekpl 168 9382 0 9363 2 0 2 2 0 8 0 vmmpepl 168 93302 0 91891 114 47 67 77 0 357 2 vmsppl 264 847 0 834 2 1 1 2 0 8 0 pdppl 4096 1702 0 1668 6 1 5 6 0 8 0 pvpl 32 270156 0 258213 146 25 121 133 0 265 20 pmappl 192 847 0 834 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 463 0 59 13 0 13 13 0 8 0