login: panic: malloc: allocation too large, type = 2, size = 8589942784 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 134628 52016 0 0 0 1 syz-executor.1 * 49354 52016 0 0 0x4000000 0K syz-executor.1 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(200002000,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(400003ff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(400003ff,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8065e54c20,80085761,ffff800020bf6ec0,42,fffffd807f7c6720,ffff800020b38270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb4e7c8,80085761,ffff800020bf6ec0,ffff800020b38270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38270,ffff800020bf7008,ffff800020bf6ff0) at sys_ioctl+0x651 syscall(ffff800020bf70a0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf70a0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,ed810f53010) at Xsyscall+0x128 end of kernel end trace frame: 0xedac63b5900, 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 = 8589942784 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(200002000,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(400003ff) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(400003ff,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd8065e54c20,80085761,ffff800020bf6ec0,42,fffffd807f7c6720,ffff800020b38270) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd806cb4e7c8,80085761,ffff800020bf6ec0,ffff800020b38270) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38270,ffff800020bf7008,ffff800020bf6ff0) at sys_ioctl+0x651 syscall(ffff800020bf70a0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020bf70a0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,ed810f53010) at Xsyscall+0x128 end of kernel end trace frame: 0xedac63b5900, count: -10 ddb{0}> show registers rdi 0xffffffff813c20e7 db_enter+0x17 rsi 0x1931 __ALIGN_SIZE+0x931 rbp 0xffff800020bf6a90 rbx 0xffff800020bf6b40 rdx 0x1932 __ALIGN_SIZE+0x932 rcx 0xffff8000029ab000 rax 0xffff8000029ab000 r8 0xffffffff811c2a43 kprintf+0x183 r9 0x1 r10 0x25 r11 0x16a098e5390c77b5 r12 0x3000000008 r13 0xffff800020bf6aa0 r14 0x100 r15 0x1 rip 0xffffffff813c20e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020bf6a80 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=49354 stat=onproc flags process=0 proc=4000000 pri=78, usrpri=78, nice=20 forw=0xffffffffffffffff, list=0xffff800020b39080,0xffffffff82367ba0 process=0xffff800020b8c018 user=0xffff800020bf2000, vmspace=0xfffffd807f00c9d8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 52016 134628 72556 0 7 0 syz-executor.1 *52016 49354 72556 0 7 0x4000000 syz-executor.1 72556 160178 33712 0 3 0x82 nanosleep syz-executor.1 2471 188873 1 0 3 0x100083 ttyin getty 21156 44012 0 0 3 0x14200 bored sosplice 33712 65463 75515 0 3 0x82 nanosleep syz-fuzzer 33712 42525 75515 0 3 0x4000082 nanosleep syz-fuzzer 33712 502465 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 294696 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 72883 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 325014 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 386384 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 217007 75515 0 3 0x4000082 thrsleep syz-fuzzer 33712 206528 75515 0 3 0x4000082 kqread syz-fuzzer 33712 206735 75515 0 3 0x4000082 thrsleep syz-fuzzer 75515 406271 54085 0 3 0x10008a pause ksh 54085 193860 31077 0 3 0x92 select sshd 31077 348777 1 0 3 0x80 select sshd 3186 91381 46582 74 3 0x100092 bpf pflogd 46582 381756 1 0 3 0x80 netio pflogd 11965 105372 90700 73 3 0x100090 kqread syslogd 90700 126506 1 0 3 0x100082 netio syslogd 81226 486745 1 77 3 0x100090 poll dhclient 23613 212917 1 0 3 0x80 poll dhclient 4591 99472 0 0 3 0x14200 pgzero zerothread 85019 326188 0 0 3 0x14200 aiodoned aiodoned 82906 247331 0 0 3 0x14200 syncer update 60289 401347 0 0 3 0x14200 cleaner cleaner 59631 115471 0 0 3 0x14200 reaper reaper 8628 383126 0 0 3 0x14200 pgdaemon pagedaemon 32161 434744 0 0 3 0x14200 bored crynlk 16238 71602 0 0 3 0x14200 bored crypto 32364 223792 0 0 3 0x40014200 acpi0 acpi0 51104 524136 0 0 3 0x40014200 idle1 42829 499722 0 0 3 0x14200 bored softnet 56394 663 0 0 3 0x14200 bored systqmp 16846 88346 0 0 3 0x14200 bored systq 27579 454874 0 0 3 0x40014200 bored softclock 86815 249430 0 0 3 0x40014200 idle0 95551 299904 0 0 3 0x14200 bored smr 1 15340 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 52016 (syz-executor.1) thread 0xffff800020b38270 (49354) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82396898) 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{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9523 6422K 6440K 78643K 10961 0 0 pcb 25 9K 11K 78643K 419 0 0 rtable 85 3K 4K 78643K 558 0 0 ifaddr 55 12K 14K 78643K 175 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1487 0 0 iov 0 0K 16K 78643K 101 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1207 76K 76K 78643K 1743 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 1K 1K 78643K 90 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 737 0 0 sigio 0 0K 0K 78643K 10 0 0 proc 54 51K 71K 78643K 547 0 0 subproc 32 32769K 67586K 78643K 312 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 71 0 0 in_multi 22 1K 2K 78643K 135 0 0 ether_multi 1 0K 0K 78643K 4 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 311 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 12K 29K 78643K 3230 0 0 UVM aobj 38 2K 2K 78643K 43 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 39 0 0 NDP 12 0K 0K 78643K 56 0 0 temp 153 2373K 2446K 78643K 5622 0 0 kqueue 0 0K 0K 78643K 2 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 11 0 8 1 0 1 1 0 8 0 inpcbpl 280 394 0 387 1 0 1 1 0 8 0 plimitpl 152 60 0 53 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 106 0 75 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 10 0 10 1 1 0 1 0 8 0 tcpcb 544 142 0 138 1 0 1 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 ppxss 1128 16 0 16 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 29 0 18 1 0 1 1 0 8 0 pfstkey 112 29 0 18 1 0 1 1 0 8 0 pfstate 328 29 0 18 2 1 1 2 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 477 0 331 12 0 12 12 0 8 1 art_table 32 478 0 331 2 0 2 2 0 8 0 art_node 16 103 0 75 1 0 1 1 0 8 0 sysvmsgpl 40 26 0 8 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 86 0 76 1 0 1 1 0 8 0 shmpl 112 41 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2731 0 1290 47 0 47 47 0 8 0 ffsino 272 2731 0 1290 97 0 97 97 0 8 0 nchpl 144 3968 0 2324 61 0 61 61 0 8 0 uvmvnodes 72 3001 0 0 55 0 55 55 0 8 0 vnodes 200 3001 0 0 158 0 158 158 0 8 0 namei 1024 12102 0 12102 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 2 0 2 1 1 0 1 0 8 0 scxspl 192 11520 0 11520 11 10 1 6 0 8 1 sigapl 432 916 0 902 2 0 2 2 0 8 0 futexpl 56 8529 0 8529 3 2 1 1 0 8 1 knotepl 112 321 0 308 1 0 1 1 0 8 0 kqueuepl 104 166 0 164 1 0 1 1 0 8 0 pipepl 112 656 0 643 3 2 1 2 0 8 0 fdescpl 488 917 0 902 3 0 3 3 0 8 0 filepl 152 5650 0 5573 8 3 5 6 0 8 1 lockfpl 104 286 0 285 3 2 1 1 0 8 0 lockfspl 32 386 0 385 3 2 1 1 0 8 0 sessionpl 112 26 0 16 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 1202 0 1193 1 0 1 1 0 8 0 zombiepl 144 902 0 902 2 1 1 1 0 8 1 processpl 840 933 0 902 4 0 4 4 0 8 0 procpl 600 2399 0 2358 4 0 4 4 0 8 0 srpgc 64 48 0 48 4 3 1 1 0 8 1 sosppl 128 10 0 10 3 2 1 1 0 8 1 sockpl 384 763 0 744 6 3 3 4 0 8 1 mcl64k 65536 4 0 0 1 0 1 1 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 9 0 0 1 0 1 1 0 8 0 mcl9k 9216 8 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 216 0 0 8 0 8 8 0 8 0 bufpl 256 7770 0 1148 414 0 414 414 0 8 0 anonpl 16 106859 0 99585 70 23 47 52 0 125 6 amapchunkpl 152 5620 0 5525 20 11 9 10 0 158 4 amappl16 192 3946 0 3481 49 19 30 36 0 8 5 amappl15 184 328 0 323 1 0 1 1 0 8 0 amappl14 176 133 0 130 1 0 1 1 0 8 0 amappl13 168 184 0 179 1 0 1 1 0 8 0 amappl12 160 19 0 16 1 0 1 1 0 8 0 amappl11 152 387 0 372 1 0 1 1 0 8 0 amappl10 144 68 0 65 1 0 1 1 0 8 0 amappl9 136 615 0 612 1 0 1 1 0 8 0 amappl8 128 184 0 169 1 0 1 1 0 8 0 amappl7 120 46 0 40 1 0 1 1 0 8 0 amappl6 112 403 0 396 1 0 1 1 0 8 0 amappl5 104 144 0 130 1 0 1 1 0 8 0 amappl4 96 1285 0 1256 2 1 1 2 0 8 0 amappl3 88 235 0 230 1 0 1 1 0 8 0 amappl2 80 6843 0 6787 2 0 2 2 0 8 0 amappl1 72 29177 0 28744 25 15 10 20 0 8 0 amappl 72 2706 0 2671 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 42 0 5 1 0 1 1 0 8 0 uaddrrnd 24 917 0 902 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 917 0 902 1 0 1 1 0 8 0 vmmpekpl 168 11634 0 11608 2 0 2 2 0 8 0 vmmpepl 168 105064 0 103645 120 39 81 81 0 357 11 vmsppl 360 916 0 902 2 0 2 2 0 8 0 pdppl 4096 1842 0 1804 6 0 6 6 0 8 0 pvpl 32 321655 0 311183 163 35 128 134 0 265 25 pmappl 224 916 0 902 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 567 0 4 17 0 17 17 0 8 0