panic: malloc: allocation too large, type = 2, size = 1073741832 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 320941 65472 0 0 0 0 syz-executor.0 *382872 88619 0 0 0x4000000 1K 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(40000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807e877738,80085761,ffff800020c554e0,3,fffffd807f7c6960,ffff800020b9b2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066fa0e58,80085761,ffff800020c554e0,ffff800020b9b2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b9b2d8,ffff800020c55628,ffff800020c55610) at sys_ioctl+0x651 syscall(ffff800020c556c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c556c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,3e02286010) at Xsyscall+0x128 end of kernel end trace frame: 0x40422a1550, 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 = 1073741832 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(40000008,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(8000000) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(8000000,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807e877738,80085761,ffff800020c554e0,3,fffffd807f7c6960,ffff800020b9b2d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066fa0e58,80085761,ffff800020c554e0,ffff800020b9b2d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b9b2d8,ffff800020c55628,ffff800020c55610) at sys_ioctl+0x651 syscall(ffff800020c556c0) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c556c0) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff85,0,3,3e02286010) at Xsyscall+0x128 end of kernel end trace frame: 0x40422a1550, count: -10 ddb{1}> show registers rdi 0xffffffff813c20e7 db_enter+0x17 rsi 0x1c63 __ALIGN_SIZE+0xc63 rbp 0xffff800020c550b0 rbx 0xffff800020c55160 rdx 0x1c64 __ALIGN_SIZE+0xc64 rcx 0xffff800001966000 rax 0xffff800001966000 r8 0xffffffff811c2a43 kprintf+0x183 r9 0x1 r10 0x25 r11 0xc402a1affa78d84e r12 0x3000000008 r13 0xffff800020c550c0 r14 0x100 r15 0x1 rip 0xffffffff813c20e8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c550a0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=382872 stat=onproc flags process=0 proc=4000000 pri=72, usrpri=72, nice=20 forw=0xffffffffffffffff, list=0xffff800020b9a270,0xffff800020b9b798 process=0xffff800020b8c018 user=0xffff800020c50000, vmspace=0xfffffd807f00cca8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 65472 320941 82505 0 7 0 syz-executor.0 88619 334163 99655 0 2 0 syz-executor.1 *88619 382872 99655 0 7 0x4000000 syz-executor.1 82505 463617 21386 0 3 0x82 nanosleep syz-executor.0 99655 169893 21386 0 3 0x82 nanosleep syz-executor.1 69771 243846 0 0 3 0x14200 bored sosplice 21386 61794 88134 0 3 0x82 thrsleep syz-fuzzer 21386 179881 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 142214 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 121908 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 193072 88134 0 3 0x4000082 kqread syz-fuzzer 21386 458317 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 257737 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 78879 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 385621 88134 0 3 0x4000082 thrsleep syz-fuzzer 21386 227047 88134 0 3 0x4000082 thrsleep syz-fuzzer 88134 298238 96717 0 3 0x10008a pause ksh 96717 147918 65643 0 3 0x92 select sshd 98726 479568 1 0 3 0x100083 ttyin getty 65643 93196 1 0 3 0x80 select sshd 68042 167403 52706 74 3 0x100092 bpf pflogd 52706 254756 1 0 3 0x80 netio pflogd 8891 502826 21291 73 3 0x100090 kqread syslogd 21291 86548 1 0 3 0x100082 netio syslogd 3676 377185 1 77 3 0x100090 poll dhclient 65650 62769 1 0 3 0x80 poll dhclient 91111 69491 0 0 3 0x14200 pgzero zerothread 30000 251698 0 0 3 0x14200 aiodoned aiodoned 89140 487883 0 0 3 0x14200 syncer update 57381 18940 0 0 3 0x14200 cleaner cleaner 67778 472518 0 0 3 0x14200 reaper reaper 7715 31012 0 0 3 0x14200 pgdaemon pagedaemon 68929 200585 0 0 3 0x14200 bored crynlk 74306 362062 0 0 3 0x14200 bored crypto 17376 451991 0 0 3 0x40014200 acpi0 acpi0 22468 335580 0 0 3 0x40014200 idle1 45943 25484 0 0 3 0x14200 bored softnet 39348 142596 0 0 3 0x14200 bored systqmp 72567 489914 0 0 3 0x14200 bored systq 96377 321798 0 0 3 0x40014200 bored softclock 86060 233807 0 0 3 0x40014200 idle0 97649 240684 0 0 3 0x14200 bored smr 1 428499 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 88619 (syz-executor.1) thread 0xffff800020b9b2d8 (382872) 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{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9503 6409K 6409K 78643K 10785 0 0 pcb 25 9K 11K 78643K 342 0 0 rtable 100 3K 4K 78643K 354 0 0 ifaddr 53 12K 13K 78643K 125 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1473 0 0 iov 0 0K 16K 78643K 56 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1206 76K 76K 78643K 1487 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 9 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 69 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 25K 78643K 472 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 53 50K 71K 78643K 387 0 0 subproc 64 65538K 67586K 78643K 143 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 62 0 0 in_multi 33 2K 2K 78643K 88 0 0 ether_multi 1 0K 0K 78643K 7 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 242 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 88 21K 29K 78643K 2364 0 0 UVM aobj 19 2K 2K 78643K 20 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 31 0 0 NDP 10 0K 0K 78643K 35 0 0 temp 144 2372K 2436K 78643K 4585 0 0 kqueue 0 0K 0K 78643K 5 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 284 0 277 1 0 1 1 0 8 0 plimitpl 152 35 0 27 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 59 0 19 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 27 0 27 1 1 0 1 0 8 0 tcpcb 544 96 0 92 1 0 1 1 0 8 0 nd6 48 8 0 4 1 0 1 1 0 8 0 ppxss 1128 15 0 15 1 0 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 24 0 7 1 0 1 1 0 8 0 pfstkey 112 24 0 7 1 0 1 1 0 8 0 pfstate 328 24 0 7 2 0 2 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 270 0 81 12 0 12 12 0 8 0 art_table 32 271 0 81 2 0 2 2 0 8 0 art_node 16 58 0 24 1 0 1 1 0 8 0 sysvmsgpl 40 11 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 67 0 57 1 0 1 1 0 8 0 shmpl 112 18 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2261 0 841 47 0 47 47 0 8 0 ffsino 272 2261 0 841 96 0 96 96 0 8 0 nchpl 144 3142 0 1503 61 0 61 61 0 8 0 uvmvnodes 72 2399 0 0 44 0 44 44 0 8 0 vnodes 200 2399 0 0 127 0 127 127 0 8 0 namei 1024 8891 0 8891 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 6 0 6 3 3 0 1 0 8 0 scxspl 192 8459 0 8459 9 8 1 6 0 8 1 sigapl 432 665 0 649 3 1 2 3 0 8 0 futexpl 56 5504 0 5504 1 0 1 1 0 8 1 knotepl 112 171 0 152 1 0 1 1 0 8 0 kqueuepl 104 134 0 132 1 0 1 1 0 8 0 pipepl 112 428 0 409 3 2 1 2 0 8 0 fdescpl 488 666 0 649 3 0 3 3 0 8 0 filepl 152 3902 0 3802 7 2 5 7 0 8 1 lockfpl 104 191 0 191 2 1 1 1 0 8 1 lockfspl 32 319 0 319 2 1 1 1 0 8 1 sessionpl 112 20 0 9 1 0 1 1 0 8 0 pgrppl 48 32 0 21 1 0 1 1 0 8 0 ucredpl 96 711 0 702 1 0 1 1 0 8 0 zombiepl 144 649 0 649 2 1 1 1 0 8 1 processpl 840 682 0 649 4 0 4 4 0 8 0 procpl 600 1657 0 1614 4 0 4 4 0 8 0 srpgc 64 12 0 12 2 2 0 1 0 8 0 sosppl 128 4 0 4 2 1 1 1 0 8 1 sockpl 384 560 0 541 5 1 4 4 0 8 2 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 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 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 136 0 0 8 0 8 8 0 8 0 bufpl 256 6635 0 1143 344 0 344 344 0 8 0 anonpl 16 69720 0 60697 54 16 38 51 0 125 1 amapchunkpl 152 3607 0 3516 10 5 5 9 0 158 0 amappl16 192 2705 0 2229 35 10 25 35 0 8 1 amappl15 184 151 0 146 1 0 1 1 0 8 0 amappl14 176 33 0 29 2 1 1 1 0 8 0 amappl13 168 27 0 24 1 0 1 1 0 8 0 amappl12 160 141 0 139 1 0 1 1 0 8 0 amappl11 152 28 0 12 1 0 1 1 0 8 0 amappl10 144 302 0 297 1 0 1 1 0 8 0 amappl9 136 586 0 583 1 0 1 1 0 8 0 amappl8 128 147 0 131 1 0 1 1 0 8 0 amappl7 120 209 0 202 1 0 1 1 0 8 0 amappl6 112 60 0 52 1 0 1 1 0 8 0 amappl5 104 246 0 232 1 0 1 1 0 8 0 amappl4 96 884 0 855 2 1 1 2 0 8 0 amappl3 88 137 0 130 1 0 1 1 0 8 0 amappl2 80 4779 0 4722 2 0 2 2 0 8 0 amappl1 72 23736 0 23296 25 15 10 20 0 8 0 amappl 72 1909 0 1872 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 19 0 1 1 0 1 1 0 8 0 uaddrrnd 24 666 0 649 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 666 0 649 1 0 1 1 0 8 0 vmmpekpl 168 9284 0 9260 2 0 2 2 0 8 0 vmmpepl 168 77685 0 76156 98 25 73 81 0 357 6 vmsppl 360 665 0 649 2 0 2 2 0 8 0 pdppl 4096 1340 0 1298 6 0 6 6 0 8 0 pvpl 32 225556 0 213223 140 29 111 133 0 265 11 pmappl 224 665 0 649 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 496 0 4 15 0 15 15 0 8 0