panic: malloc: allocation too large, type = 2, size = 13052075704 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *150849 84716 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(309f6deb8,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(613edbd6) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(613edbd6,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802c70a470,80085761,ffff800014a0c780,2,fffffd803f7c6ae0,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f816358,80085761,ffff800014a0c780,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a0c8c8,ffff800014a0c8b0) at sys_ioctl+0x638 syscall(ffff800014a0c960) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,f4a1d055010) at Xsyscall+0x128 end of kernel end trace frame: 0xf4ce085bdc0, 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 = 13052075704 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(309f6deb8,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(613edbd6) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(613edbd6,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd802c70a470,80085761,ffff800014a0c780,2,fffffd803f7c6ae0,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f816358,80085761,ffff800014a0c780,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a0c8c8,ffff800014a0c8b0) at sys_ioctl+0x638 syscall(ffff800014a0c960) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,f4a1d055010) at Xsyscall+0x128 end of kernel end trace frame: 0xf4ce085bdc0, count: -10 ddb> show registers rdi 0xffffffff8161b027 db_enter+0x17 rsi 0x1f13 __ALIGN_SIZE+0xf13 rbp 0xffff800014a0c350 rbx 0xffff800014a0c400 rdx 0x1f14 __ALIGN_SIZE+0xf14 rcx 0xffff800002b3c000 rax 0xffff800002b3c000 r8 0xffff800014a0c310 r9 0x1 r10 0xffff800001945780 r11 0xa76bbd684c519f6b r12 0x3000000008 r13 0xffff800014a0c360 r14 0x100 r15 0x1 rip 0xffffffff8161b028 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a0c340 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=150849 stat=onproc flags process=0 proc=4000000 pri=65, usrpri=65, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff9520,0xffffffff82290d98 process=0xffff8000ffffa008 user=0xffff800014a07000, vmspace=0xfffffd803f014d68 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 84716 408385 61263 0 2 0 syz-executor.0 *84716 150849 61263 0 7 0x4000000 syz-executor.0 61263 213863 34605 0 3 0x82 nanosleep syz-executor.0 49310 296842 34605 0 3 0x82 nanosleep syz-executor.1 34605 148916 57755 0 3 0x82 thrsleep syz-fuzzer 34605 302608 57755 0 3 0x4000082 thrsleep syz-fuzzer 34605 475626 57755 0 3 0x4000082 thrsleep syz-fuzzer 34605 348648 57755 0 3 0x4000082 thrsleep syz-fuzzer 34605 355535 57755 0 3 0x4000082 kqread syz-fuzzer 34605 184249 57755 0 3 0x4000082 thrsleep syz-fuzzer 34605 33386 57755 0 3 0x4000082 thrsleep syz-fuzzer 34605 27319 57755 0 3 0x4000082 thrsleep syz-fuzzer 57755 255700 95434 0 3 0x10008a pause ksh 95434 512643 12887 0 3 0x92 select sshd 49065 360574 1 0 3 0x100083 ttyin getty 12887 116585 1 0 3 0x80 select sshd 4228 54678 52064 73 3 0x100090 kqread syslogd 52064 328861 1 0 3 0x100082 netio syslogd 25768 240583 1 77 3 0x100090 poll dhclient 34045 7977 1 0 3 0x80 poll dhclient 35464 468834 0 0 2 0x14200 zerothread 78806 124575 0 0 3 0x14200 aiodoned aiodoned 15029 47465 0 0 3 0x14200 syncer update 91578 27271 0 0 3 0x14200 cleaner cleaner 70043 100308 0 0 3 0x14200 reaper reaper 45021 279042 0 0 3 0x14200 pgdaemon pagedaemon 10411 436163 0 0 3 0x14200 bored crynlk 87013 272439 0 0 3 0x14200 bored crypto 47758 486627 0 0 3 0x40014200 acpi0 acpi0 57092 45989 0 0 3 0x14200 bored softnet 88331 1932 0 0 3 0x14200 bored systqmp 62051 227908 0 0 3 0x14200 bored systq 11506 316642 0 0 3 0x40014200 bored softclock 72833 19924 0 0 3 0x40014200 idle0 62727 320755 0 0 3 0x14200 bored smr 1 8648 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 9469 6336K 6336K 78643K 10618 0 0 pcb 23 9K 10K 78643K 863 0 0 rtable 100 3K 3K 78643K 223 0 0 ifaddr 46 11K 11K 78643K 61 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 16 0 0 iov 0 0K 32K 78643K 29 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 75K 76K 78643K 1323 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 1K 78643K 2 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 213 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 19K 78643K 358 0 0 proc 41 30K 46K 78643K 275 0 0 subproc 64 65538K 67586K 78643K 103 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 29 0 0 in_multi 33 2K 2K 78643K 49 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 178 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 75 20K 21K 78643K 1584 0 0 UVM aobj 15 2K 2K 78643K 15 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 18 0 0 NDP 8 0K 0K 78643K 17 0 0 temp 111 2347K 2417K 78643K 4124 0 0 kqueue 0 0K 0K 78643K 4 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 108 0 101 1 0 1 1 0 8 0 plimitpl 152 19 0 12 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 tcpqe 32 6 0 6 1 1 0 1 0 8 0 tcpcb 544 30 0 26 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 2 0 2 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 226 0 41 12 0 12 12 0 8 0 art_table 32 227 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 211 0 201 1 0 1 1 0 8 0 shmpl 112 13 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2090 0 678 46 0 46 46 0 8 0 ffsino 240 2090 0 678 84 0 84 84 0 8 0 nchpl 144 2908 0 1280 61 0 61 61 0 8 0 uvmvnodes 72 2162 0 0 40 0 40 40 0 8 0 vnodes 200 2162 0 0 114 0 114 114 0 8 0 namei 1024 7361 0 7361 2 1 1 1 0 8 1 scxspl 192 7925 0 7925 9 8 1 6 0 8 1 sigapl 432 525 0 512 2 0 2 2 0 8 0 futexpl 56 8244 0 8244 1 0 1 1 0 8 1 knotepl 112 108 0 89 1 0 1 1 0 8 0 kqueuepl 104 59 0 57 1 0 1 1 0 8 0 pipepl 112 246 0 227 2 1 1 1 0 8 0 fdescpl 424 526 0 512 2 0 2 2 0 8 0 filepl 120 3380 0 3284 4 0 4 4 0 8 1 lockfpl 104 76 0 75 2 1 1 1 0 8 0 lockfspl 32 54 0 53 2 1 1 1 0 8 0 sessionpl 112 18 0 8 1 0 1 1 0 8 0 pgrppl 48 18 0 8 1 0 1 1 0 8 0 ucredpl 96 469 0 462 1 0 1 1 0 8 0 zombiepl 144 512 0 511 2 1 1 1 0 8 0 processpl 840 540 0 511 4 0 4 4 0 8 0 procpl 600 965 0 928 4 0 4 4 0 8 1 sockpl 384 934 0 917 3 0 3 3 0 8 1 mcl64k 65536 233 0 233 29 15 14 29 0 8 14 mcl16k 16384 1 0 1 1 1 0 1 0 8 0 mcl12k 12288 4 0 4 3 2 1 1 0 8 1 mcl9k 9216 3 0 3 2 1 1 1 0 8 1 mcl8k 8192 2 0 2 1 0 1 1 0 8 1 mcl4k 4096 13 0 13 3 2 1 1 0 8 1 mcl2k2 2112 1 0 1 1 1 0 1 0 8 0 mcl2k 2048 46711 0 46678 12 7 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 82942 0 82871 46 30 16 43 0 8 8 bufpl 256 6349 0 1872 280 0 280 280 0 8 0 anonpl 16 57660 0 49016 55 3 52 52 0 62 17 amapchunkpl 152 2158 0 2076 5 1 4 5 0 158 0 amappl16 192 2282 0 1825 36 0 36 36 0 8 12 amappl15 184 48 0 44 1 0 1 1 0 8 0 amappl14 176 23 0 21 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 207 0 204 1 0 1 1 0 8 0 amappl11 152 138 0 123 1 0 1 1 0 8 0 amappl10 144 62 0 61 2 1 1 1 0 8 0 amappl9 136 539 0 536 1 0 1 1 0 8 0 amappl8 128 115 0 103 1 0 1 1 0 8 0 amappl7 120 26 0 23 1 0 1 1 0 8 0 amappl6 112 166 0 159 1 0 1 1 0 8 0 amappl5 104 319 0 310 1 0 1 1 0 8 0 amappl4 96 705 0 679 2 1 1 2 0 8 0 amappl3 88 309 0 303 1 0 1 1 0 8 0 amappl2 80 3635 0 3585 2 0 2 2 0 8 0 amappl1 72 17730 0 17321 26 17 9 19 0 8 0 amappl 72 1205 0 1172 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 14 0 0 1 0 1 1 0 8 0 uaddrrnd 24 526 0 512 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 526 0 512 1 0 1 1 0 8 0 vmmpekpl 168 7350 0 7333 1 0 1 1 0 8 0 vmmpepl 168 59959 0 58584 106 30 76 76 0 357 15 vmsppl 264 525 0 512 1 0 1 1 0 8 0 pdppl 4096 1058 0 1024 5 0 5 5 0 8 0 pvpl 32 184026 0 172315 148 15 133 133 0 265 38 pmappl 192 525 0 512 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 482 0 58 14 0 14 14 0 8 0