panic: malloc: allocation too large, type = 2, size = 12330553848 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *294159 45713 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(2def551f8,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(5bdeaa3e) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5bdeaa3e,ffff800001942100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd800445f248,80085761,ffff800014a29940,82,fffffd803f7c6c00,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fbc24c0,80085761,ffff800014a29940,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a29a88,ffff800014a29a70) at sys_ioctl+0x638 syscall(ffff800014a29b20) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,8f3bd0e4010) at Xsyscall+0x128 end of kernel end trace frame: 0x8f5e9530520, 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 = 12330553848 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(2def551f8,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(5bdeaa3e) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(5bdeaa3e,ffff800001942100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd800445f248,80085761,ffff800014a29940,82,fffffd803f7c6c00,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fbc24c0,80085761,ffff800014a29940,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a29a88,ffff800014a29a70) at sys_ioctl+0x638 syscall(ffff800014a29b20) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,8f3bd0e4010) at Xsyscall+0x128 end of kernel end trace frame: 0x8f5e9530520, count: -10 ddb> show registers rdi 0xffffffff81c4ed97 db_enter+0x17 rsi 0x1f7f __ALIGN_SIZE+0xf7f rbp 0xffff800014a29510 rbx 0xffff800014a295c0 rdx 0x1f80 __ALIGN_SIZE+0xf80 rcx 0xffff800000d3b000 rax 0xffff800000d3b000 r8 0xffff800014a294d0 r9 0x1 r10 0xffff80000193b040 r11 0x577cd40972b12c89 r12 0x3000000008 r13 0xffff800014a29520 r14 0x100 r15 0x1 rip 0xffffffff81c4ed98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a29500 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=294159 stat=onproc flags process=0 proc=4000000 pri=82, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84b8,0xffffffff8225e010 process=0xffff8000ffff66a0 user=0xffff800014a24000, vmspace=0xfffffd803f013b58 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 45713 401073 48904 0 2 0 syz-executor.0 *45713 294159 48904 0 7 0x4000000 syz-executor.0 16325 294399 74046 0 2 0 syz-executor.1 16325 391407 74046 0 3 0x4000080 select syz-executor.1 74046 303497 95671 0 2 0x482 syz-executor.1 48904 406397 95671 0 3 0x82 nanosleep syz-executor.0 77774 61577 0 0 3 0x14200 bored sosplice 95671 353749 7112 0 3 0x82 kqread syz-fuzzer 95671 43875 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 77976 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 516747 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 164581 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 192656 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 468747 7112 0 3 0x4000082 thrsleep syz-fuzzer 95671 332590 7112 0 3 0x4000082 thrsleep syz-fuzzer 7112 78822 16009 0 3 0x10008a pause ksh 16009 106213 30336 0 3 0x92 select sshd 19858 314277 1 0 3 0x100083 ttyin getty 30336 76942 1 0 3 0x80 select sshd 9385 351489 37573 73 3 0x100090 kqread syslogd 37573 69995 1 0 3 0x100082 netio syslogd 66312 66878 1 77 3 0x100090 poll dhclient 41384 299341 1 0 3 0x80 poll dhclient 94614 108858 0 0 2 0x14200 zerothread 87501 187528 0 0 3 0x14200 aiodoned aiodoned 73769 305787 0 0 3 0x14200 syncer update 58955 331553 0 0 3 0x14200 cleaner cleaner 80320 321476 0 0 3 0x14200 reaper reaper 37365 484054 0 0 3 0x14200 pgdaemon pagedaemon 31243 114978 0 0 3 0x14200 bored crynlk 87290 341903 0 0 3 0x14200 bored crypto 56545 697 0 0 3 0x40014200 acpi0 acpi0 5273 421495 0 0 3 0x14200 bored softnet 21032 397020 0 0 3 0x14200 bored systqmp 31643 462919 0 0 3 0x14200 bored systq 38667 443490 0 0 3 0x40014200 bored softclock 5397 392817 0 0 3 0x40014200 idle0 89076 489060 0 0 3 0x14200 bored smr 1 24536 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 9490 6343K 6351K 78643K 10843 0 0 pcb 23 9K 10K 78643K 393 0 0 rtable 100 3K 3K 78643K 510 0 0 ifaddr 53 13K 14K 78643K 183 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 26 0 0 iov 0 0K 16K 78643K 99 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1205 76K 76K 78643K 1659 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 16 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 64 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 619 0 0 sigio 0 0K 0K 78643K 12 0 0 proc 42 30K 46K 78643K 420 0 0 subproc 64 65538K 67586K 78643K 245 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 88 0 0 in_multi 33 2K 2K 78643K 114 0 0 ether_multi 1 0K 0K 78643K 6 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 255 0 0 pfkey data 0 0K 0K 78643K 2 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 38K 78643K 2246 0 0 UVM aobj 43 2K 2K 78643K 49 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 29 0 0 NDP 10 0K 0K 78643K 54 0 0 temp 141 2355K 2419K 78643K 4919 0 0 kqueue 0 0K 0K 78643K 5 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 9 0 5 1 0 1 1 0 8 0 inpcbpl 280 346 0 339 1 0 1 1 0 8 0 plimitpl 152 35 0 28 1 0 1 1 0 8 0 rtentry 112 86 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 14 0 14 1 1 0 1 0 8 0 tcpcb 544 115 0 111 1 0 1 1 0 8 0 nd6 48 14 0 10 1 0 1 1 0 8 0 ppxss 1128 22 0 22 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 403 0 212 12 0 12 12 0 8 0 art_table 32 404 0 212 2 0 2 2 0 8 0 art_node 16 85 0 51 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 4 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 62 0 52 1 0 1 1 0 8 0 shmpl 112 47 0 6 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2539 0 1114 47 0 47 47 0 8 0 ffsino 240 2539 0 1114 84 0 84 84 0 8 0 nchpl 144 3590 0 1965 61 0 61 61 0 8 0 uvmvnodes 72 2728 0 0 50 0 50 50 0 8 0 vnodes 200 2728 0 0 144 0 144 144 0 8 0 namei 1024 10397 0 10397 3 2 1 1 0 8 1 scxspl 192 13286 0 13286 10 9 1 6 0 8 1 sigapl 432 774 0 760 2 0 2 2 0 8 0 futexpl 56 9577 0 9577 2 1 1 1 0 8 1 knotepl 112 287 0 268 2 0 2 2 0 8 0 kqueuepl 104 173 0 171 1 0 1 1 0 8 0 pipepl 112 536 0 517 3 2 1 2 0 8 0 fdescpl 424 775 0 760 2 0 2 2 0 8 0 filepl 120 4928 0 4833 6 2 4 5 0 8 1 lockfpl 104 234 0 233 3 2 1 1 0 8 0 lockfspl 32 386 0 385 3 2 1 1 0 8 0 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 30 0 20 1 0 1 1 0 8 0 ucredpl 96 1217 0 1210 1 0 1 1 0 8 0 zombiepl 144 760 0 760 2 1 1 1 0 8 1 processpl 840 790 0 760 4 0 4 4 0 8 0 procpl 600 1559 0 1520 5 1 4 4 0 8 1 sosppl 128 11 0 11 2 2 0 1 0 8 0 sockpl 384 694 0 677 4 1 3 3 0 8 1 mcl64k 65536 532 0 532 67 41 26 65 0 8 26 mcl16k 16384 2 0 2 2 2 0 1 0 8 0 mcl12k 12288 15 0 15 4 3 1 1 0 8 1 mcl9k 9216 8 0 8 5 4 1 1 0 8 1 mcl8k 8192 8 0 8 3 3 0 1 0 8 0 mcl4k 4096 36 0 36 3 2 1 1 0 8 1 mcl2k2 2112 4 0 4 3 3 0 1 0 8 0 mcl2k 2048 47085 0 47051 14 9 5 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 80970 0 80897 40 33 7 37 0 8 0 bufpl 256 8199 0 2584 352 0 352 352 0 8 0 anonpl 16 81532 0 74262 65 17 48 53 0 62 11 amapchunkpl 152 3476 0 3393 16 7 9 14 0 158 5 amappl16 192 3320 0 2855 43 19 24 36 0 8 0 amappl15 184 93 0 88 1 0 1 1 0 8 0 amappl14 176 425 0 424 2 1 1 1 0 8 0 amappl13 168 29 0 26 1 0 1 1 0 8 0 amappl12 160 299 0 292 1 0 1 1 0 8 0 amappl11 152 62 0 51 1 0 1 1 0 8 0 amappl10 144 134 0 128 1 0 1 1 0 8 0 amappl9 136 541 0 538 1 0 1 1 0 8 0 amappl8 128 143 0 128 1 0 1 1 0 8 0 amappl7 120 100 0 94 1 0 1 1 0 8 0 amappl6 112 60 0 52 1 0 1 1 0 8 0 amappl5 104 239 0 228 1 0 1 1 0 8 0 amappl4 96 727 0 702 2 1 1 2 0 8 0 amappl3 88 746 0 740 1 0 1 1 0 8 0 amappl2 80 5705 0 5645 2 0 2 2 0 8 0 amappl1 72 22852 0 22429 25 15 10 19 0 8 0 amappl 72 1800 0 1766 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 48 0 6 1 0 1 1 0 8 0 uaddrrnd 24 775 0 760 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 775 0 760 1 0 1 1 0 8 0 vmmpekpl 168 9122 0 9104 2 0 2 2 0 8 0 vmmpepl 168 86160 0 84688 115 38 77 78 0 357 13 vmsppl 264 774 0 760 2 1 1 2 0 8 0 pdppl 4096 1556 0 1520 5 0 5 5 0 8 0 pvpl 32 322903 0 312376 268 57 211 239 0 265 114 pmappl 192 774 0 760 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 592 0 94 16 0 16 16 0 8 0