login: panic: malloc: allocation too large, type = 2, size = 8724152352 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *220055 40752 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(208000020,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(41000003) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(41000003,ffff800001971800) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8038494848,80085761,ffff800014a0cf80,83,fffffd803f7c6960,ffff8000149fe720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361b1170,80085761,ffff800014a0cf80,ffff8000149fe720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149fe720,ffff800014a0d0c8,ffff800014a0d0b0) at sys_ioctl+0x638 syscall(ffff800014a0d160) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,55984f5c010) at Xsyscall+0x128 end of kernel end trace frame: 0x55c1e636c80, 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 = 8724152352 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(208000020,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(41000003) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(41000003,ffff800001971800) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8038494848,80085761,ffff800014a0cf80,83,fffffd803f7c6960,ffff8000149fe720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80361b1170,80085761,ffff800014a0cf80,ffff8000149fe720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149fe720,ffff800014a0d0c8,ffff800014a0d0b0) at sys_ioctl+0x638 syscall(ffff800014a0d160) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,55984f5c010) at Xsyscall+0x128 end of kernel end trace frame: 0x55c1e636c80, count: -10 ddb> show registers rdi 0xffffffff810e7007 db_enter+0x17 rsi 0x1fa7 __ALIGN_SIZE+0xfa7 rbp 0xffff800014a0cb50 rbx 0xffff800014a0cc00 rdx 0x1fa8 __ALIGN_SIZE+0xfa8 rcx 0xffff800003b3c000 rax 0xffff800003b3c000 r8 0xffff800014a0cb10 r9 0x1 r10 0xffff800000936d40 r11 0x6d493aa427fdf243 r12 0x3000000008 r13 0xffff800014a0cb60 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a0cb40 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=220055 stat=onproc flags process=0 proc=4000000 pri=82, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff8000149fe978,0xffff8000149ffc48 process=0xffff8000ffff7a50 user=0xffff800014a08000, vmspace=0xfffffd803f013420 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 34316 322953 7467 0 2 0 syz-executor.0 34316 336514 7467 0 3 0x4000080 fsleep syz-executor.0 40752 4950 38233 0 2 0 syz-executor.1 *40752 220055 38233 0 7 0x4000000 syz-executor.1 7467 344925 93739 0 3 0x82 nanosleep syz-executor.0 38233 58334 93739 0 3 0x82 nanosleep syz-executor.1 68688 241014 1 0 3 0x100083 ttyin getty 3954 355231 0 0 3 0x14200 bored sosplice 93739 170299 89554 0 3 0x82 thrsleep syz-fuzzer 93739 178133 89554 0 3 0x4000082 thrsleep syz-fuzzer 93739 191648 89554 0 3 0x4000082 thrsleep syz-fuzzer 93739 140228 89554 0 3 0x4000082 kqread syz-fuzzer 93739 416845 89554 0 3 0x4000082 thrsleep syz-fuzzer 93739 36808 89554 0 3 0x4000082 thrsleep syz-fuzzer 93739 419700 89554 0 3 0x4000082 thrsleep syz-fuzzer 93739 71549 89554 0 3 0x4000082 thrsleep syz-fuzzer 89554 391280 63539 0 3 0x10008a pause ksh 63539 337567 66007 0 3 0x92 select sshd 66007 262293 1 0 3 0x80 select sshd 94817 18436 29165 73 3 0x100090 kqread syslogd 29165 67519 1 0 3 0x100082 netio syslogd 15985 496584 1 77 3 0x100090 poll dhclient 3932 107640 1 0 3 0x80 poll dhclient 11439 147837 0 0 2 0x14200 zerothread 70776 47821 0 0 3 0x14200 aiodoned aiodoned 29325 172129 0 0 3 0x14200 syncer update 33383 306095 0 0 3 0x14200 cleaner cleaner 66116 507554 0 0 3 0x14200 reaper reaper 98075 499482 0 0 3 0x14200 pgdaemon pagedaemon 8490 299091 0 0 3 0x14200 bored crynlk 26686 16849 0 0 3 0x14200 bored crypto 36588 325730 0 0 3 0x40014200 acpi0 acpi0 31742 498742 0 0 3 0x14200 bored softnet 78583 419387 0 0 3 0x14200 bored systqmp 28428 414845 0 0 3 0x14200 bored systq 17791 211465 0 0 3 0x40014200 bored softclock 17064 175671 0 0 3 0x40014200 idle0 3842 359793 0 0 3 0x14200 bored smr 1 126677 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 9499 6354K 6354K 78643K 10808 0 0 pcb 24 9K 10K 78643K 336 0 0 rtable 100 3K 3K 78643K 523 0 0 ifaddr 55 13K 14K 78643K 166 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 28 0 0 iov 0 0K 24K 78643K 62 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1201 75K 75K 78643K 1608 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 11 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 76 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 21K 78643K 536 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 41 30K 46K 78643K 468 0 0 subproc 64 65538K 67586K 78643K 313 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 69 0 0 in_multi 33 2K 2K 78643K 122 0 0 ether_multi 1 0K 0K 78643K 4 0 0 mrt 0 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 260 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 81 20K 22K 78643K 2105 0 0 UVM aobj 24 2K 2K 78643K 24 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 14 0 0 NDP 11 0K 0K 78643K 53 0 0 temp 153 2353K 2417K 78643K 4828 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 11 0 7 1 0 1 1 0 8 0 inpcbpl 280 290 0 282 1 0 1 1 0 8 0 plimitpl 152 34 0 26 1 0 1 1 0 8 0 rtentry 112 104 0 64 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 5 0 5 1 1 0 1 0 8 0 tcpcb 544 92 0 88 1 0 1 1 0 8 0 nd6 48 18 0 14 1 0 1 1 0 8 0 ppxss 1128 16 0 16 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 487 0 296 12 0 12 12 0 8 0 art_table 32 488 0 296 2 0 2 2 0 8 0 art_node 16 103 0 69 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 6 2 1 1 1 0 8 0 semapl 112 74 0 64 1 0 1 1 0 8 0 shmpl 112 22 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2359 0 934 47 0 47 47 0 8 0 ffsino 240 2359 0 934 84 0 84 84 0 8 0 nchpl 144 3307 0 1673 61 0 61 61 0 8 0 uvmvnodes 72 2570 0 0 47 0 47 47 0 8 0 vnodes 200 2570 0 0 136 0 136 136 0 8 0 namei 1024 9541 0 9541 4 3 1 1 0 8 1 scxspl 192 12479 0 12479 11 8 3 6 0 8 3 sigapl 432 686 0 672 2 0 2 2 0 8 0 futexpl 56 8183 0 8182 3 2 1 1 0 8 0 knotepl 112 297 0 278 1 0 1 1 0 8 0 kqueuepl 104 130 0 128 1 0 1 1 0 8 0 pipepl 112 426 0 407 3 2 1 1 0 8 0 fdescpl 424 687 0 672 2 0 2 2 0 8 0 filepl 120 4255 0 4158 5 1 4 4 0 8 1 lockfpl 104 215 0 214 3 2 1 1 0 8 0 lockfspl 32 323 0 322 3 2 1 1 0 8 0 sessionpl 112 25 0 15 1 0 1 1 0 8 0 pgrppl 48 31 0 21 1 0 1 1 0 8 0 ucredpl 96 884 0 877 1 0 1 1 0 8 0 zombiepl 144 672 0 672 3 2 1 1 0 8 1 processpl 840 702 0 672 4 0 4 4 0 8 0 procpl 600 1365 0 1326 4 0 4 4 0 8 0 sosppl 128 6 0 6 2 1 1 1 0 8 1 sockpl 384 566 0 548 4 1 3 3 0 8 1 mcl64k 65536 15 0 15 2 1 1 1 0 8 1 mcl16k 16384 3 0 3 2 2 0 1 0 8 0 mcl12k 12288 12 0 12 4 3 1 1 0 8 1 mcl9k 9216 11 0 11 3 2 1 1 0 8 1 mcl8k 8192 11 0 11 4 3 1 1 0 8 1 mcl4k 4096 35 0 35 4 3 1 1 0 8 1 mcl2k2 2112 2 0 2 2 1 1 1 0 8 1 mcl2k 2048 48019 0 47982 13 7 6 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 81820 0 81757 13 7 6 8 0 8 0 bufpl 256 7631 0 1989 353 0 353 353 0 8 0 anonpl 16 76461 0 69154 65 28 37 50 0 62 0 amapchunkpl 152 3461 0 3353 17 11 6 15 0 158 1 amappl16 192 2922 0 2476 34 10 24 33 0 8 1 amappl15 184 89 0 84 1 0 1 1 0 8 0 amappl14 176 34 0 33 3 2 1 1 0 8 0 amappl13 168 393 0 385 1 0 1 1 0 8 0 amappl12 160 13 0 11 2 1 1 1 0 8 0 amappl11 152 174 0 163 1 0 1 1 0 8 0 amappl10 144 143 0 141 3 2 1 1 0 8 0 amappl9 136 582 0 579 1 0 1 1 0 8 0 amappl8 128 142 0 129 1 0 1 1 0 8 0 amappl7 120 43 0 37 1 0 1 1 0 8 0 amappl6 112 183 0 177 1 0 1 1 0 8 0 amappl5 104 150 0 138 1 0 1 1 0 8 0 amappl4 96 883 0 856 2 1 1 2 0 8 0 amappl3 88 145 0 140 1 0 1 1 0 8 0 amappl2 80 5059 0 4997 2 0 2 2 0 8 0 amappl1 72 21714 0 21292 26 17 9 19 0 8 0 amappl 72 1649 0 1609 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 23 0 0 1 0 1 1 0 8 0 uaddrrnd 24 687 0 672 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 687 0 672 1 0 1 1 0 8 0 vmmpekpl 168 8970 0 8952 2 0 2 2 0 8 0 vmmpepl 168 79547 0 78097 122 47 75 78 0 357 11 vmsppl 264 686 0 672 2 1 1 2 0 8 0 pdppl 4096 1380 0 1344 5 0 5 5 0 8 0 pvpl 32 279634 0 269082 265 75 190 229 0 265 93 pmappl 192 686 0 672 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 503 0 28 14 0 14 14 0 8 0