panic: malloc: allocation too large, type = 2, size = 4694952024 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *390748 93023 0 0 0x4000000 1K syz-executor.0 429624 41209 0 0 0 0 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(117d74858,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(22fae90a) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(22fae90a,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807bc32388,80085761,ffff800020c5f550,82,fffffd807f7c6780,ffff800020b38978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807be0a9a0,80085761,ffff800020c5f550,ffff800020b38978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38978,ffff800020c5f698,ffff800020c5f680) at sys_ioctl+0x651 syscall(ffff800020c5f730) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5f730) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,f314c678010) at Xsyscall+0x128 end of kernel end trace frame: 0xf33d8f941c0, 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 = 4694952024 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(117d74858,2,2) at malloc+0xa6f sys/kern/kern_malloc.c:339 wsmux_getmux(22fae90a) at wsmux_getmux+0x71 sys/dev/wscons/wsmux.c:152 wsmux_add_mux(22fae90a,ffff800000026d00) at wsmux_add_mux+0x2f sys/dev/wscons/wsmux.c:594 VOP_IOCTL(fffffd807bc32388,80085761,ffff800020c5f550,82,fffffd807f7c6780,ffff800020b38978) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd807be0a9a0,80085761,ffff800020c5f550,ffff800020b38978) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b38978,ffff800020c5f698,ffff800020c5f680) at sys_ioctl+0x651 syscall(ffff800020c5f730) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c5f730) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,f314c678010) at Xsyscall+0x128 end of kernel end trace frame: 0xf33d8f941c0, count: -10 ddb{1}> show registers rdi 0xffffffff81adbfd7 db_enter+0x17 rsi 0x18e0 __ALIGN_SIZE+0x8e0 rbp 0xffff800020c5f120 rbx 0xffff800020c5f1d0 rdx 0x18e1 __ALIGN_SIZE+0x8e1 rcx 0xffff800000966000 rax 0xffff800000966000 r8 0xffffffff81d75573 kprintf+0x183 r9 0x1 r10 0x25 r11 0xa2f50744fe1bb900 r12 0x3000000008 r13 0xffff800020c5f130 r14 0x100 r15 0x1 rip 0xffffffff81adbfd8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c5f110 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{1}> show proc PROC (syz-executor.0) pid=390748 stat=onproc flags process=0 proc=4000000 pri=83, usrpri=83, nice=20 forw=0xffffffffffffffff, list=0xffff800020b38018,0xffffffff8235c268 process=0xffff800020b8c6a8 user=0xffff800020c5a000, vmspace=0xfffffd807effe708 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 93023 378905 1562 0 2 0 syz-executor.0 *93023 390748 1562 0 7 0x4000000 syz-executor.0 41209 429624 89241 0 7 0 syz-executor.1 41209 457124 89241 0 3 0x4000080 fsleep syz-executor.1 41209 336916 89241 0 2 0x4000000 syz-executor.1 83193 159410 0 0 3 0x14200 bored sosplice 89241 165922 35981 0 3 0x82 nanosleep syz-executor.1 1562 295586 35981 0 3 0x82 nanosleep syz-executor.0 35981 14577 10830 0 3 0x82 thrsleep syz-fuzzer 35981 514009 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 517515 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 10332 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 387683 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 470231 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 289217 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 17718 10830 0 3 0x4000082 kqread syz-fuzzer 35981 248624 10830 0 3 0x4000082 thrsleep syz-fuzzer 35981 31983 10830 0 3 0x4000082 thrsleep syz-fuzzer 10830 350029 4981 0 3 0x10008a pause ksh 4981 289941 16987 0 3 0x92 select sshd 98308 423073 1 0 3 0x100083 ttyin getty 16987 114290 1 0 3 0x80 select sshd 57301 289982 15157 74 3 0x100092 bpf pflogd 15157 142660 1 0 3 0x80 netio pflogd 76852 63850 78457 73 3 0x100090 kqread syslogd 78457 113250 1 0 3 0x100082 netio syslogd 28373 511191 1 77 3 0x100090 poll dhclient 12989 313420 1 0 3 0x80 poll dhclient 40954 115567 0 0 2 0x14200 zerothread 29814 248081 0 0 3 0x14200 aiodoned aiodoned 91632 148604 0 0 3 0x14200 syncer update 82699 489941 0 0 3 0x14200 cleaner cleaner 47148 184078 0 0 3 0x14200 reaper reaper 61787 175652 0 0 3 0x14200 pgdaemon pagedaemon 61115 205208 0 0 3 0x14200 bored crynlk 36338 216779 0 0 3 0x14200 bored crypto 34490 357630 0 0 3 0x40014200 acpi0 acpi0 72868 498507 0 0 3 0x40014200 idle1 47668 49274 0 0 3 0x14200 bored softnet 63436 169492 0 0 3 0x14200 bored systqmp 18201 40885 0 0 3 0x14200 bored systq 47582 163114 0 0 3 0x40014200 bored softclock 65684 54967 0 0 3 0x40014200 idle0 30890 491970 0 0 3 0x14200 bored smr 1 508261 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 93023 (syz-executor.0) thread 0xffff800020b38978 (390748) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823681d0) 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 9474 6390K 6406K 78643K 10593 0 0 pcb 25 9K 10K 78643K 71 0 0 rtable 100 3K 4K 78643K 206 0 0 ifaddr 43 11K 12K 78643K 60 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1469 0 0 iov 0 0K 16K 78643K 11 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 1249 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 1K 1K 78643K 2 0 0 sem 10 0K 0K 78643K 10 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 6 17K 21K 78643K 83 0 0 proc 53 50K 71K 78643K 325 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 ip_moptions 0 0K 0K 78643K 10 0 0 in_multi 33 2K 2K 78643K 40 0 0 ether_multi 1 0K 0K 78643K 2 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 200 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 85 20K 29K 78643K 1116 0 0 UVM aobj 4 2K 2K 78643K 4 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 6 0 0 NDP 7 0K 0K 78643K 15 0 0 temp 97 2366K 2430K 78643K 3359 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 71 0 64 1 0 1 1 0 8 0 plimitpl 152 20 0 12 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpqe 32 8 0 8 1 1 0 1 0 8 0 tcpcb 544 30 0 26 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 4 0 4 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 12 0 2 1 0 1 1 0 8 0 pfstkey 112 12 0 2 1 0 1 1 0 8 0 pfstate 328 12 0 2 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 184 0 0 12 0 12 12 0 8 0 art_table 32 185 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 semapl 112 8 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1572 0 163 46 0 46 46 0 8 0 ffsino 272 1572 0 163 95 0 95 95 0 8 0 nchpl 144 1885 0 254 61 0 61 61 0 8 0 uvmvnodes 72 1623 0 0 30 0 30 30 0 8 0 vnodes 200 1623 0 0 86 0 86 86 0 8 0 namei 1024 4956 0 4956 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4747 0 4747 8 7 1 6 0 8 1 sigapl 432 282 0 266 2 0 2 2 0 8 0 futexpl 56 914 0 913 1 0 1 1 0 8 0 knotepl 112 65 0 45 1 0 1 1 0 8 0 kqueuepl 104 25 0 21 1 0 1 1 0 8 0 pipepl 112 176 0 157 3 2 1 1 0 8 0 fdescpl 488 283 0 266 3 0 3 3 0 8 0 filepl 152 1530 0 1424 5 0 5 5 0 8 0 lockfpl 104 25 0 24 2 1 1 1 0 8 0 lockfspl 32 11 0 10 2 1 1 1 0 8 0 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 191 0 182 1 0 1 1 0 8 0 zombiepl 144 266 0 266 3 2 1 1 0 8 1 processpl 840 299 0 266 4 0 4 4 0 8 0 procpl 600 455 0 410 4 0 4 4 0 8 0 sosppl 128 3 0 3 1 0 1 1 0 8 1 sockpl 384 125 0 106 3 0 3 3 0 8 1 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 126 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 143 0 0 8 0 8 8 0 8 0 bufpl 256 5788 0 1143 291 0 291 291 0 8 0 anonpl 16 39552 0 30605 47 3 44 44 0 125 8 amapchunkpl 152 1406 0 1309 9 0 9 9 0 158 4 amappl16 192 808 0 343 24 0 24 24 0 8 0 amappl15 184 89 0 83 1 0 1 1 0 8 0 amappl14 176 27 0 24 3 2 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 8 0 8 1 1 0 1 0 8 0 amappl11 152 61 0 43 1 0 1 1 0 8 0 amappl10 144 68 0 65 1 0 1 1 0 8 0 amappl9 136 612 0 607 1 0 1 1 0 8 0 amappl8 128 162 0 146 1 0 1 1 0 8 0 amappl7 120 30 0 27 1 0 1 1 0 8 0 amappl6 112 60 0 52 1 0 1 1 0 8 0 amappl5 104 110 0 96 1 0 1 1 0 8 0 amappl4 96 522 0 490 2 1 1 2 0 8 0 amappl3 88 117 0 111 1 0 1 1 0 8 0 amappl2 80 1283 0 1219 2 0 2 2 0 8 0 amappl1 72 15582 0 15132 25 12 13 20 0 8 3 amappl 72 703 0 664 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 283 0 266 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 283 0 266 1 0 1 1 0 8 0 vmmpekpl 168 6356 0 6333 2 0 2 2 0 8 0 vmmpepl 168 37375 0 35827 90 12 78 78 0 357 10 vmsppl 360 282 0 266 2 0 2 2 0 8 0 pdppl 4096 574 0 532 6 0 6 6 0 8 0 pvpl 32 142585 0 130329 124 6 118 118 0 265 19 pmappl 224 282 0 266 2 0 2 2 0 8 1 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 441 0 5 13 0 13 13 0 8 0