login: panic: malloc: allocation too large, type = 2, size = 268788272 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *238643 73906 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(10056230,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(200ac45) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(200ac45,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8030558d78,80085761,ffff800014a06170,42,fffffd803f7c6780,ffff8000149e8720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8037ccfae0,80085761,ffff800014a06170,ffff8000149e8720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e8720,ffff800014a062b8,ffff800014a062a0) at sys_ioctl+0x638 syscall(ffff800014a06350) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,7b07979e010) at Xsyscall+0x128 end of kernel end trace frame: 0x7b330384d00, 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 = 268788272 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(10056230,2,2) at malloc+0xa13 sys/kern/kern_malloc.c:339 wsmux_getmux(200ac45) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(200ac45,ffff800000669100) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8030558d78,80085761,ffff800014a06170,42,fffffd803f7c6780,ffff8000149e8720) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8037ccfae0,80085761,ffff800014a06170,ffff8000149e8720) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e8720,ffff800014a062b8,ffff800014a062a0) at sys_ioctl+0x638 syscall(ffff800014a06350) at syscall+0x541 Xsyscall(6,0,ffffffffffffff86,0,3,7b07979e010) at Xsyscall+0x128 end of kernel end trace frame: 0x7b330384d00, count: -10 ddb> show registers rdi 0xffffffff81c4ed97 db_enter+0x17 rsi 0x1eb8 __ALIGN_SIZE+0xeb8 rbp 0xffff800014a05d40 rbx 0xffff800014a05df0 rdx 0x1eb9 __ALIGN_SIZE+0xeb9 rcx 0xffff800002b3c000 rax 0xffff800002b3c000 r8 0xffff800014a05d00 r9 0x1 r10 0xffff800001b3bb80 r11 0xdc58fc60e38ad0de r12 0x3000000008 r13 0xffff800014a05d50 r14 0x100 r15 0x1 rip 0xffffffff81c4ed98 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a05d30 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=238643 stat=onproc flags process=0 proc=4000000 pri=62, usrpri=62, nice=20 forw=0xffffffffffffffff, list=0xffff8000149e9c38,0xffffffff8225e010 process=0xffff800014953080 user=0xffff800014a01000, vmspace=0xfffffd803f013420 estcpu=25, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 73906 234775 82572 0 2 0 syz-executor.0 *73906 238643 82572 0 7 0x4000000 syz-executor.0 93443 391037 93674 0 3 0x80 nanosleep syz-executor.1 93443 194001 93674 0 3 0x4000080 piperd syz-executor.1 93443 369976 93674 0 3 0x4000080 fsleep syz-executor.1 82572 204546 93719 0 2 0x482 syz-executor.0 93674 142345 93719 0 3 0x82 nanosleep syz-executor.1 93719 224315 94016 0 3 0x82 thrsleep syz-fuzzer 93719 307798 94016 0 3 0x4000082 thrsleep syz-fuzzer 93719 48980 94016 0 3 0x4000082 thrsleep syz-fuzzer 93719 381337 94016 0 3 0x4000082 thrsleep syz-fuzzer 93719 224793 94016 0 3 0x4000082 kqread syz-fuzzer 93719 402123 94016 0 3 0x4000082 thrsleep syz-fuzzer 93719 166799 94016 0 3 0x4000082 thrsleep syz-fuzzer 94016 98939 79419 0 3 0x10008a pause ksh 79419 362901 16018 0 3 0x92 select sshd 82015 256501 1 0 3 0x100083 ttyin getty 16018 223494 1 0 3 0x80 select sshd 37369 206218 81623 73 3 0x100090 kqread syslogd 81623 377436 1 0 3 0x100082 netio syslogd 52405 137377 1 77 3 0x100090 poll dhclient 57985 240747 1 0 3 0x80 poll dhclient 50859 69222 0 0 3 0x14200 pgzero zerothread 25818 439292 0 0 3 0x14200 aiodoned aiodoned 65774 202502 0 0 3 0x14200 syncer update 93142 283952 0 0 3 0x14200 cleaner cleaner 57230 37419 0 0 3 0x14200 reaper reaper 54502 327625 0 0 3 0x14200 pgdaemon pagedaemon 35769 385176 0 0 3 0x14200 bored crynlk 89269 60197 0 0 3 0x14200 bored crypto 96008 503611 0 0 3 0x40014200 acpi0 acpi0 31167 228980 0 0 3 0x14200 bored softnet 80575 232932 0 0 3 0x14200 bored systqmp 61218 284017 0 0 3 0x14200 bored systq 6923 100673 0 0 3 0x40014200 bored softclock 59182 43017 0 0 3 0x40014200 idle0 49202 316974 0 0 3 0x14200 bored smr 1 20101 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 9439 6311K 6311K 78643K 10532 0 0 pcb 23 9K 9K 78643K 55 0 0 rtable 97 2K 2K 78643K 167 0 0 ifaddr 34 9K 9K 78643K 34 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 1 4K 12K 78643K 5 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1199 75K 75K 78643K 1207 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 6 0K 0K 78643K 6 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 6 17K 17K 78643K 26 0 0 proc 40 30K 46K 78643K 247 0 0 subproc 64 65538K 67586K 78643K 68 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 in_multi 33 2K 2K 78643K 33 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 36 159K 159K 78643K 36 0 0 exec 0 0K 1K 78643K 165 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 73 20K 20K 78643K 801 0 0 UVM aobj 6 2K 2K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 5 0K 0K 78643K 9 0 0 temp 79 2344K 2408K 78643K 2899 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 28 0 21 1 0 1 1 0 8 0 plimitpl 152 14 0 7 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 10 0 6 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 186 0 0 12 0 12 12 0 8 0 art_table 32 187 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 semapl 112 4 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1440 0 31 46 0 46 46 0 8 0 ffsino 240 1440 0 31 83 0 83 83 0 8 0 nchpl 144 1684 0 60 61 0 61 61 0 8 0 uvmvnodes 72 1483 0 0 27 0 27 27 0 8 0 vnodes 200 1483 0 0 79 0 79 79 0 8 0 namei 1024 4006 0 4006 2 1 1 1 0 8 1 scxspl 192 4201 0 4201 8 5 3 6 0 8 3 sigapl 432 196 0 182 2 0 2 2 0 8 0 futexpl 56 222 0 221 1 0 1 1 0 8 0 knotepl 112 49 0 30 1 0 1 1 0 8 0 kqueuepl 104 6 0 4 1 0 1 1 0 8 0 pipepl 112 136 0 115 2 1 1 1 0 8 0 fdescpl 424 197 0 182 2 0 2 2 0 8 0 filepl 120 1001 0 904 4 0 4 4 0 8 0 lockfpl 104 9 0 8 2 1 1 1 0 8 0 lockfspl 32 5 0 4 2 1 1 1 0 8 0 sessionpl 112 17 0 7 1 0 1 1 0 8 0 pgrppl 48 17 0 7 1 0 1 1 0 8 0 ucredpl 96 70 0 63 1 0 1 1 0 8 0 zombiepl 144 182 0 182 2 1 1 1 0 8 1 processpl 840 211 0 182 4 0 4 4 0 8 0 procpl 600 231 0 193 4 0 4 4 0 8 0 sockpl 384 70 0 53 3 0 3 3 0 8 1 mcl4k 4096 8 0 8 1 1 0 1 0 8 0 mcl2k 2048 47504 0 47468 11 2 9 9 0 8 4 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 77245 0 77157 10 4 6 6 0 8 0 bufpl 256 5619 0 1156 280 0 280 280 0 8 0 anonpl 16 28010 0 19802 37 2 35 35 0 62 2 amapchunkpl 152 767 0 682 5 0 5 5 0 158 1 amappl16 192 531 0 100 23 0 23 23 0 8 1 amappl15 184 58 0 51 1 0 1 1 0 8 0 amappl14 176 22 0 19 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 10 0 8 1 0 1 1 0 8 0 amappl11 152 22 0 9 1 0 1 1 0 8 0 amappl10 144 58 0 56 2 1 1 1 0 8 0 amappl9 136 500 0 497 1 0 1 1 0 8 0 amappl8 128 111 0 101 1 0 1 1 0 8 0 amappl7 120 25 0 22 1 0 1 1 0 8 0 amappl6 112 51 0 45 1 0 1 1 0 8 0 amappl5 104 189 0 179 1 0 1 1 0 8 0 amappl4 96 375 0 352 1 0 1 1 0 8 0 amappl3 88 115 0 109 1 0 1 1 0 8 0 amappl2 80 711 0 649 2 0 2 2 0 8 0 amappl1 72 12480 0 12037 26 9 17 19 0 8 8 amappl 72 444 0 409 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 197 0 182 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 197 0 182 1 0 1 1 0 8 0 vmmpekpl 168 5608 0 5590 1 0 1 1 0 8 0 vmmpepl 168 28151 0 26704 91 14 77 77 0 357 14 vmsppl 264 196 0 182 1 0 1 1 0 8 0 pdppl 4096 400 0 364 5 0 5 5 0 8 0 pvpl 32 108248 0 96939 105 4 101 101 0 265 9 pmappl 192 196 0 182 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 411 0 10 12 0 12 12 0 8 0