panic: malloc: allocation too large, type = 2, size = 8589934616 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *265736 77201 0 0 0x4000000 1K syz-executor.0 71987 26610 0 0x2 0x4000000 0 syz-fuzzer 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(200000018,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(40000002) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(40000002,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807d9c97a8,80085761,ffff800020c51160,3,fffffd807f7c6900,ffff800020b752d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb38568,80085761,ffff800020c51160,ffff800020b752d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b752d8,ffff800020c512a8,ffff800020c51290) at sys_ioctl+0x651 syscall(ffff800020c51340) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c51340) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,c5f5b24c010) at Xsyscall+0x128 end of kernel end trace frame: 0xc6223e47e30, 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{1}> ddb{1}> set $lines = 0 ddb{1}> set $maxwidth = 0 ddb{1}> show panic malloc: allocation too large, type = 2, size = 8589934616 ddb{1}> 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(200000018,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(40000002) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(40000002,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807d9c97a8,80085761,ffff800020c51160,3,fffffd807f7c6900,ffff800020b752d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb38568,80085761,ffff800020c51160,ffff800020b752d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b752d8,ffff800020c512a8,ffff800020c51290) at sys_ioctl+0x651 syscall(ffff800020c51340) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c51340) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,c5f5b24c010) at Xsyscall+0x128 end of kernel end trace frame: 0xc6223e47e30, count: -10 ddb{1}> show registers rdi 0xffffffff814367b7 db_enter+0x17 rsi 0x1b3b __ALIGN_SIZE+0xb3b rbp 0xffff800020c50d30 rbx 0xffff800020c50de0 rdx 0x1b3c __ALIGN_SIZE+0xb3c rcx 0xffff800003b66000 rax 0xffff800003b66000 r8 0xffffffff818d1a13 kprintf+0x183 r9 0x1 r10 0x25 r11 0x15ccaa485920015a r12 0x3000000008 r13 0xffff800020c50d40 r14 0x100 r15 0x1 rip 0xffffffff814367b8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c50d20 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=265736 stat=onproc flags process=0 proc=4000000 pri=81, usrpri=81, nice=20 forw=0xffffffffffffffff, list=0xffff800020b75788,0xffffffff82393cf8 process=0xffff800020b8c6a8 user=0xffff800020c4c000, vmspace=0xfffffd807effd870 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 77201 155549 40710 0 2 0 syz-executor.0 *77201 265736 40710 0 7 0x4000000 syz-executor.0 40710 34214 26610 0 3 0x82 nanosleep syz-executor.0 1526 364777 26610 0 2 0x2 syz-executor.1 59583 344808 0 0 3 0x14200 bored sosplice 26610 182851 77306 0 3 0x82 thrsleep syz-fuzzer 26610 201528 77306 0 3 0x4000082 nanosleep syz-fuzzer 26610 283893 77306 0 3 0x4000082 thrsleep syz-fuzzer 26610 71987 77306 0 7 0x4000002 syz-fuzzer 26610 258103 77306 0 3 0x4000082 thrsleep syz-fuzzer 26610 150520 77306 0 3 0x4000082 kqread syz-fuzzer 26610 133082 77306 0 3 0x4000082 thrsleep syz-fuzzer 26610 176605 77306 0 3 0x4000082 thrsleep syz-fuzzer 26610 410241 77306 0 3 0x4000082 thrsleep syz-fuzzer 26610 406178 77306 0 3 0x4000082 thrsleep syz-fuzzer 77306 93601 72646 0 3 0x10008a pause ksh 72646 126077 1421 0 3 0x92 select sshd 31210 434188 1 0 3 0x100083 ttyin getty 1421 192452 1 0 3 0x80 select sshd 58657 438795 2916 74 3 0x100092 bpf pflogd 2916 124880 1 0 3 0x80 netio pflogd 15585 211552 85280 73 3 0x100090 kqread syslogd 85280 25169 1 0 3 0x100082 netio syslogd 76540 447079 1 77 3 0x100090 poll dhclient 61751 228173 1 0 3 0x80 poll dhclient 61028 55657 0 0 3 0x14200 pgzero zerothread 26104 51500 0 0 3 0x14200 aiodoned aiodoned 23758 57737 0 0 3 0x14200 syncer update 54151 165146 0 0 3 0x14200 cleaner cleaner 21551 407228 0 0 3 0x14200 reaper reaper 28027 60044 0 0 3 0x14200 pgdaemon pagedaemon 43642 300632 0 0 3 0x14200 bored crynlk 53933 102258 0 0 3 0x14200 bored crypto 48878 374227 0 0 3 0x40014200 acpi0 acpi0 78946 391385 0 0 3 0x40014200 idle1 7117 280378 0 0 3 0x14200 bored softnet 19406 49947 0 0 3 0x14200 bored systqmp 59517 287401 0 0 3 0x14200 bored systq 63139 278328 0 0 3 0x40014200 bored softclock 1198 11233 0 0 3 0x40014200 idle0 15102 446799 0 0 3 0x14200 bored smr 1 43086 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 77201 (syz-executor.0) thread 0xffff800020b752d8 (265736) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82349ce8) 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 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9512 6414K 6422K 78643K 10756 0 0 pcb 25 9K 10K 78643K 250 0 0 rtable 103 4K 4K 78643K 365 0 0 ifaddr 56 13K 13K 78643K 123 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1475 0 0 iov 0 0K 24K 78643K 50 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 76K 78643K 1431 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 6 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 70 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 363 0 0 sigio 0 0K 0K 78643K 5 0 0 proc 53 50K 71K 78643K 382 0 0 subproc 64 65538K 67586K 78643K 136 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 41 0 0 in_multi 33 2K 2K 78643K 72 0 0 ether_multi 1 0K 0K 78643K 5 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 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 237 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 78 20K 21K 78643K 2007 0 0 UVM aobj 25 3K 3K 78643K 28 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 17 0 0 NDP 11 0K 0K 78643K 35 0 0 temp 149 2371K 2435K 78643K 4251 0 0 kqueue 0 0K 0K 78643K 2 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 2 1 0 1 1 0 8 0 inpcbpl 280 208 0 201 1 0 1 1 0 8 0 plimitpl 152 24 0 16 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 60 0 20 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 28 0 28 1 1 0 1 0 8 0 tcpcb 544 73 0 69 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 ppxss 1128 11 0 11 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 17 0 13 1 0 1 1 0 8 0 pfstkey 112 17 0 13 1 0 1 1 0 8 0 pfstate 328 17 0 13 1 0 1 1 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 270 0 82 12 0 12 12 0 8 0 art_table 32 271 0 82 2 0 2 2 0 8 0 art_node 16 59 0 25 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 5 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 68 0 58 1 0 1 1 0 8 0 shmpl 112 26 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2104 0 688 46 0 46 46 0 8 0 ffsino 272 2104 0 688 95 0 95 95 0 8 0 nchpl 144 2796 0 1157 61 0 61 61 0 8 0 uvmvnodes 72 2207 0 0 41 0 41 41 0 8 0 vnodes 200 2207 0 0 117 0 117 117 0 8 0 namei 1024 7923 0 7923 4 3 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 7472 0 7472 10 9 1 6 0 8 1 sigapl 432 556 0 541 3 1 2 3 0 8 0 futexpl 56 4137 0 4137 2 1 1 1 0 8 1 knotepl 112 134 0 115 1 0 1 1 0 8 0 kqueuepl 104 71 0 68 1 0 1 1 0 8 0 pipepl 112 316 0 297 3 2 1 2 0 8 0 fdescpl 488 557 0 541 3 0 3 3 0 8 0 filepl 152 3117 0 3016 5 0 5 5 0 8 1 lockfpl 104 140 0 140 3 2 1 1 0 8 1 lockfspl 32 119 0 119 3 2 1 1 0 8 1 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 26 0 15 1 0 1 1 0 8 0 ucredpl 96 610 0 601 1 0 1 1 0 8 0 zombiepl 144 541 0 541 2 1 1 1 0 8 1 processpl 840 573 0 541 4 0 4 4 0 8 0 procpl 600 1308 0 1266 4 0 4 4 0 8 0 srpgc 64 13 0 13 3 2 1 1 0 8 1 sosppl 128 9 0 9 2 2 0 1 0 8 0 sockpl 384 415 0 396 4 1 3 3 0 8 1 mcl64k 65536 229 0 0 29 5 24 29 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 5 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 120 0 0 14 0 14 14 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 316 0 0 19 1 18 19 0 8 0 bufpl 256 6411 0 1145 330 0 330 330 0 8 0 anonpl 16 72205 0 64336 66 16 50 51 0 125 12 amapchunkpl 152 3230 0 3148 10 5 5 9 0 158 1 amappl16 192 2586 0 2115 46 15 31 36 0 8 7 amappl15 184 57 0 53 1 0 1 1 0 8 0 amappl14 176 197 0 193 2 1 1 1 0 8 0 amappl13 168 89 0 81 1 0 1 1 0 8 0 amappl12 160 11 0 10 1 0 1 1 0 8 0 amappl11 152 25 0 10 1 0 1 1 0 8 0 amappl10 144 67 0 64 1 0 1 1 0 8 0 amappl9 136 726 0 723 1 0 1 1 0 8 0 amappl8 128 285 0 271 1 0 1 1 0 8 0 amappl7 120 34 0 29 1 0 1 1 0 8 0 amappl6 112 53 0 47 1 0 1 1 0 8 0 amappl5 104 127 0 113 1 0 1 1 0 8 0 amappl4 96 781 0 750 2 1 1 2 0 8 0 amappl3 88 285 0 280 1 0 1 1 0 8 0 amappl2 80 3738 0 3680 2 0 2 2 0 8 0 amappl1 72 21532 0 21087 25 15 10 20 0 8 0 amappl 72 1556 0 1523 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 27 0 3 1 0 1 1 0 8 0 uaddrrnd 24 557 0 541 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 557 0 541 1 0 1 1 0 8 0 vmmpekpl 168 8506 0 8481 2 0 2 2 0 8 0 vmmpepl 168 66880 0 65405 106 25 81 81 0 357 16 vmsppl 360 556 0 541 2 0 2 2 0 8 0 pdppl 4096 1122 0 1082 6 0 6 6 0 8 0 pvpl 32 215692 0 204566 160 33 127 131 0 265 27 pmappl 224 556 0 541 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 521 0 12 15 0 15 15 0 8 0