panic: malloc: allocation too large, type = 2, size = 6901666752 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *284870 40127 0 0 0x4000000 0 syz-executor.0 468865 73126 0 0x2 0 1 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(19b5f13c0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(336be277) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(336be277,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8076df40f0,80085761,ffff800020c23540,3,fffffd807f7c69c0,ffff800020b39530) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb47ac0,80085761,ffff800020c23540,ffff800020b39530) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b39530,ffff800020c23688,ffff800020c23670) at sys_ioctl+0x651 syscall(ffff800020c23720) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c23720) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,c80e3e13010) at Xsyscall+0x128 end of kernel end trace frame: 0xc8396cf0820, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic malloc: allocation too large, type = 2, size = 6901666752 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(19b5f13c0,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(336be277) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(336be277,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8076df40f0,80085761,ffff800020c23540,3,fffffd807f7c69c0,ffff800020b39530) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb47ac0,80085761,ffff800020c23540,ffff800020b39530) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b39530,ffff800020c23688,ffff800020c23670) at sys_ioctl+0x651 syscall(ffff800020c23720) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c23720) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,c80e3e13010) at Xsyscall+0x128 end of kernel end trace frame: 0xc8396cf0820, count: -10 ddb{0}> show registers rdi 0xffffffff81b0eb47 db_enter+0x17 rsi 0x187d __ALIGN_SIZE+0x87d rbp 0xffff800020c23110 rbx 0xffff800020c231c0 rdx 0x187e __ALIGN_SIZE+0x87e rcx 0xffff8000039a0000 rax 0xffff8000039a0000 r8 0xffffffff81476a83 kprintf+0x183 r9 0x1 r10 0x25 r11 0x6bd5c063178715de r12 0x3000000008 r13 0xffff800020c23120 r14 0x100 r15 0x1 rip 0xffffffff81b0eb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c23100 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=284870 stat=onproc flags process=0 proc=4000000 pri=72, usrpri=72, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39c38,0xffffffff8237cfc8 process=0xffff800020b8cd38 user=0xffff800020c1e000, vmspace=0xfffffd807effd870 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 40127 14177 73126 0 2 0 syz-executor.0 *40127 284870 73126 0 7 0x4000000 syz-executor.0 49976 190543 67253 0 2 0x2 syz-executor.1 73126 468865 67253 0 7 0x2 syz-executor.0 50874 82173 1 0 3 0x100083 ttyin getty 22099 37741 0 0 3 0x14200 bored sosplice 67253 293350 31635 0 3 0x82 thrsleep syz-fuzzer 67253 125253 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 286198 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 107478 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 374717 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 277994 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 487943 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 396400 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 327810 31635 0 3 0x4000082 thrsleep syz-fuzzer 67253 454558 31635 0 3 0x4000082 kqread syz-fuzzer 31635 376988 2139 0 3 0x10008a pause ksh 2139 224094 38786 0 3 0x92 select sshd 38786 412813 1 0 3 0x80 select sshd 73106 468369 804 74 3 0x100092 bpf pflogd 804 236115 1 0 3 0x80 netio pflogd 55385 521508 28123 73 3 0x100090 kqread syslogd 28123 76927 1 0 3 0x100082 netio syslogd 65381 86258 1 77 3 0x100090 poll dhclient 44549 75735 1 0 3 0x80 poll dhclient 80168 492810 0 0 3 0x14200 pgzero zerothread 16526 322320 0 0 3 0x14200 aiodoned aiodoned 14142 350357 0 0 3 0x14200 syncer update 16859 173079 0 0 3 0x14200 cleaner cleaner 71754 369565 0 0 3 0x14200 reaper reaper 60550 463219 0 0 3 0x14200 pgdaemon pagedaemon 49467 430892 0 0 3 0x14200 bored crynlk 36752 199957 0 0 3 0x14200 bored crypto 41712 192871 0 0 3 0x40014200 acpi0 acpi0 22472 456447 0 0 3 0x40014200 idle1 8740 403248 0 0 3 0x14200 bored softnet 23178 128646 0 0 3 0x14200 bored systqmp 36820 366563 0 0 3 0x14200 bored systq 96073 238602 0 0 3 0x40014200 bored softclock 29340 197916 0 0 3 0x40014200 idle0 54550 375029 0 0 3 0x14200 bored smr 1 328407 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 40127 (syz-executor.0) thread 0xffff800020b39530 (284870) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82394290) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 Process 49976 (syz-executor.1) thread 0xffff800020b38720 (190543) exclusive rrwlock inode r = 0 (0xfffffd806e318e78) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_ihash.c:140 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 ufs_ihashins+0x6d sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x143 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0x10f sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x76 sys/kern/vfs_vops.c:449 #8 domkdirat+0x12d sys/kern/vfs_syscalls.c:2881 #9 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8068de81b8) locked @ /syzkaller/managers/multicore/kernel/sys/ufs/ufs/ufs_vnops.c:1547 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 _rw_enter+0x45d sys/kern/kern_rwlock.c:280 #2 _rrw_enter+0x60 sys/kern/kern_rwlock.c:410 #3 VOP_LOCK+0x57 sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xf5 sys/kern/vfs_lookup.c:387 #6 namei+0x4b2 sys/kern/vfs_lookup.c:224 #7 domkdirat+0x81 sys/kern/vfs_syscalls.c:2866 #8 syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9504 6423K 6436K 78643K 10770 0 0 pcb 25 9K 12K 78643K 294 0 0 rtable 100 3K 4K 78643K 556 0 0 ifaddr 54 12K 13K 78643K 156 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1482 0 0 iov 0 0K 16K 78643K 41 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1203 75K 76K 78643K 1563 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 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 97 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 21K 78643K 452 0 0 sigio 0 0K 0K 78643K 15 0 0 proc 54 51K 71K 78643K 585 0 0 subproc 64 65538K 67586K 78643K 375 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 28 0 0 in_multi 33 2K 2K 78643K 149 0 0 ether_multi 1 0K 0K 78643K 5 0 0 mrt 0 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 266 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 87 21K 29K 78643K 2310 0 0 UVM aobj 34 2K 2K 78643K 36 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 24 0 0 NDP 10 0K 0K 78643K 53 0 0 temp 140 2374K 2499K 78643K 4916 0 0 kqueue 0 0K 0K 78643K 11 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 13 0 9 1 0 1 1 0 8 0 inpcbpl 280 263 0 256 1 0 1 1 0 8 0 plimitpl 152 47 0 39 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 122 0 82 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 16 0 16 1 1 0 1 0 8 0 tcpcb 544 82 0 78 1 0 1 1 0 8 0 nd6 48 22 0 18 1 0 1 1 0 8 0 ppxss 1128 10 0 10 3 2 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 32 0 10 1 0 1 1 0 8 0 pfstkey 112 32 0 10 1 0 1 1 0 8 0 pfstate 328 32 0 10 3 0 3 3 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 558 0 369 12 0 12 12 0 8 0 art_table 32 559 0 369 2 0 2 2 0 8 0 art_node 16 121 0 87 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 4 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 95 0 85 1 0 1 1 0 8 0 shmpl 112 34 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2141 0 705 47 0 47 47 0 8 0 ffsino 272 2141 0 705 96 0 96 96 0 8 0 nchpl 144 2976 0 1344 62 0 62 62 0 8 0 uvmvnodes 72 2381 0 0 44 0 44 44 0 8 0 vnodes 200 2381 0 0 126 0 126 126 0 8 0 namei 1024 8668 0 8667 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 3 0 3 2 1 1 1 0 8 1 scxspl 192 7765 0 7765 8 7 1 6 0 8 1 sigapl 432 625 0 610 2 0 2 2 0 8 0 futexpl 56 5051 0 5051 1 0 1 1 0 8 1 knotepl 112 317 0 298 1 0 1 1 0 8 0 kqueuepl 104 108 0 106 1 0 1 1 0 8 0 pipepl 112 532 0 513 3 2 1 2 0 8 0 fdescpl 488 626 0 610 3 0 3 3 0 8 0 filepl 152 3790 0 3690 8 3 5 7 0 8 1 lockfpl 104 114 0 114 2 1 1 1 0 8 1 lockfspl 32 113 0 113 2 1 1 1 0 8 1 sessionpl 112 28 0 17 1 0 1 1 0 8 0 pgrppl 48 36 0 25 1 0 1 1 0 8 0 ucredpl 96 624 0 615 1 0 1 1 0 8 0 zombiepl 144 610 0 610 2 1 1 1 0 8 1 processpl 840 642 0 610 4 0 4 4 0 8 0 procpl 600 1479 0 1437 4 0 4 4 0 8 0 srpgc 64 54 0 54 1 1 0 1 0 8 0 sosppl 128 9 0 9 2 2 0 1 0 8 0 sockpl 384 496 0 477 5 2 3 5 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 12 0 0 2 0 2 2 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 135 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 155 0 0 9 0 9 9 0 8 0 bufpl 256 6465 0 1143 333 0 333 333 0 8 0 anonpl 16 71514 0 62945 56 17 39 50 0 125 2 amapchunkpl 152 3588 0 3501 9 4 5 9 0 158 1 amappl16 192 2417 0 1949 37 12 25 33 0 8 1 amappl15 184 108 0 104 1 0 1 1 0 8 0 amappl14 176 48 0 46 2 1 1 1 0 8 0 amappl13 168 128 0 123 1 0 1 1 0 8 0 amappl12 160 133 0 130 2 1 1 1 0 8 0 amappl11 152 148 0 132 1 0 1 1 0 8 0 amappl10 144 132 0 128 1 0 1 1 0 8 0 amappl9 136 619 0 615 1 0 1 1 0 8 0 amappl8 128 188 0 171 1 0 1 1 0 8 0 amappl7 120 91 0 88 1 0 1 1 0 8 0 amappl6 112 194 0 184 1 0 1 1 0 8 0 amappl5 104 245 0 231 1 0 1 1 0 8 0 amappl4 96 944 0 908 2 1 1 2 0 8 0 amappl3 88 135 0 130 1 0 1 1 0 8 0 amappl2 80 4066 0 4013 2 0 2 2 0 8 0 amappl1 72 23325 0 22886 26 16 10 20 0 8 0 amappl 72 1781 0 1745 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 35 0 2 1 0 1 1 0 8 0 uaddrrnd 24 626 0 610 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 626 0 610 1 0 1 1 0 8 0 vmmpekpl 168 9190 0 9165 2 0 2 2 0 8 0 vmmpepl 168 75821 0 74346 101 25 76 81 0 357 7 vmsppl 360 625 0 610 2 0 2 2 0 8 0 pdppl 4096 1260 0 1220 6 0 6 6 0 8 0 pvpl 32 229170 0 217326 144 34 110 129 0 265 10 pmappl 224 625 0 610 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 486 0 4 14 0 14 14 0 8 0