Out-of-bounds write in Vim - CVE-2022-1785

 

Out-of-bounds write in Vim - CVE-2022-1785

Published: May 20, 2022


Vulnerability identifier: #VU63487
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-1785
CWE-ID: CWE-787
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code

The vulnerability exists due to a boundary error when processing untrusted input in vim_regsub_both() function. A remote attacker can create a specially crafted file, trick the victim into opening it using the affected software, trigger out-of-bounds write and execute arbitrary code on the target system.


Affected software

Vim
Cloud Pak for Security (CP4S)
IBM Qradar SIEM
Gentoo Linux
Amazon Linux AMI
SUSE CaaS Platform
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Linux Enterprise Micro
SUSE Enterprise Storage
Anolis OS
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
SUSE OpenStack Cloud Crowbar
SUSE OpenStack Cloud
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP
Ubuntu
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Desktop
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Module for Basesystem
SUSE Linux Enterprise Module for Desktop Applications
openSUSE Leap
openEuler
VMware Tanzu Application Service for VMs
Isolation Segment
Red Hat Advanced Cluster Management for Kubernetes
Ansible Automation Platform
Red Hat Advanced Cluster Security for Kubernetes
OpenShift Logging
Red Hat OpenShift distributed tracing (RHOSDT)
IBM Watson Speech Services Cartridge for IBM Cloud Pak for Data
App Connect Enterprise Certified Container
Dell Secure Connect Gateway
IBM Robotic Process Automation
Dell EMC PowerProtect Data Protection
Dell Data Protection Central
cflinuxfs3
IBM Cloud Pak for Watson AIOps
EMC Cloud Tiering Appliance
Self Node Remediation Operator
OpenShift sandboxed containers
OpenShift Service Mesh
VMware Tanzu Operations Manager
OpenShift Data Foundation (formerly OpenShift Container Storage)
OpenShift Virtualization
Migration Toolkit for Containers
Red Hat OpenShift Container Platform
Red Hat Virtualization Host
Red Hat Ceph Storage
vim (Red Hat package)
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
vim (Ubuntu package)
vim-athena (Ubuntu package)
vim-gnome (Ubuntu package)
vim-nox (Ubuntu package)
vim-tiny (Ubuntu package)
vim-gtk (Ubuntu package)
vim-gtk3 (Ubuntu package)
vim-X11
vim-common
vim-enhanced
vim-minimal
vim-filesystem
vim
vim-debuginfo
vim-debugsource
gvim-debuginfo
vim-small
vim-small-debuginfo
vim-data
vim-data-common
gvim
app-editors/vim
app-editors/gvim
app-editors/vim-core
vim-motif (Ubuntu package)
Dell EMC Storage Monitoring and Reporting (SMR)
EMC ViPR SRM
Dell EMC VxRail Appliance

How to mitigate CVE-2022-1785

Install updates from vendor's website.

Vim - update to 8.2.4977
Self Node Remediation Operator - update to 0.4.1
OpenShift sandboxed containers - update to 1.3.1
Migration Toolkit for Containers - update to 1.7.4
OpenShift Service Mesh - update to 2.2.2
Red Hat Advanced Cluster Management for Kubernetes - addressed in versions 2.3.12, 2.4.6, 2.5.2, 2.6.0
Red Hat Advanced Cluster Security for Kubernetes - update to 3.72
Red Hat OpenShift Container Platform - addressed in versions 4.11.1, 4.11.45, 4.13.0
OpenShift Logging - addressed in versions 5.3.11, 5.3.14, 5.4.5, 5.5.5
vim (Red Hat package) - addressed in versions 8.0.1763-19.el8_6.4, 8.2.2637-16.el9_0.3
vim (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:7.4.16893ubuntu1.5+esm8, 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5, 2:9.0.0242-1ubuntu1.3
vim-athena (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5, 2:9.0.0242-1ubuntu1.3
vim-gnome (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12
vim-nox (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5, 2:9.0.0242-1ubuntu1.3
vim-tiny (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5, 2:9.0.0242-1ubuntu1.3
vim-gtk (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5
cflinuxfs3 - update to 0.360.0
Cloud Pak for Security (CP4S) - update to 1.10.12.0
Red Hat OpenShift distributed tracing (RHOSDT) - update to 2.6.0
VMware Tanzu Operations Manager - update to 3.0.8
IBM Cloud Pak for Watson AIOps - update to 4.1.1
IBM Watson Speech Services Cartridge for IBM Cloud Pak for Data - update to 4.6.0
Dell EMC Storage Monitoring and Reporting (SMR) - update to 4.9.0.0
EMC ViPR SRM - update to 4.9.0.0
OpenShift Data Foundation (formerly OpenShift Container Storage) - update to 4.11.0
OpenShift Virtualization - addressed in versions 4.11.1, 4.12.0
App Connect Enterprise Certified Container - addressed in versions 5.0.1, 5.2.0
Dell Secure Connect Gateway - update to 5.14.00.16
Dell EMC VxRail Appliance - addressed in versions 7.0.372, 8.0.000
IBM Qradar SIEM - addressed in versions 7.4.3 Fix Pack 8, 7.5.0 Update Pack 4
vim-gtk3 (Ubuntu package) - addressed in versions 2:8.0.1453-1ubuntu1.12, 2:8.1.2269-1ubuntu5.13, 2:8.2.3995-1ubuntu2.5, 2:9.0.0242-1ubuntu1.3
vim-X11 - update to 8.0.1763-19.0.1
vim-common - update to 8.0.1763-19.0.1
vim-enhanced - update to 8.0.1763-19.0.1
vim-minimal - update to 8.0.1763-19.0.1
vim-filesystem - update to 8.0.1763-19.0.1
vim - update to 8.2-30
vim-X11 - update to 8.2-30
vim-common - update to 8.2-30
vim-debuginfo - update to 8.2-30
vim-debugsource - update to 8.2-30
vim-enhanced - update to 8.2-30
vim-filesystem - update to 8.2-30
vim-minimal - update to 8.2-30
gvim-debuginfo - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim-small - update to 8.2.5038-150000.5.21.1
vim-debugsource - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim-debuginfo - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim-small-debuginfo - update to 8.2.5038-150000.5.21.1
vim-data - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim-data-common - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
gvim - addressed in versions 8.2.5038-150000.5.21.1, 9.0.0814-17.9.1
vim - addressed in versions 8.2.5172-1.1, 9.0.1160-1.1
app-editors/vim - addressed in versions 9.0.0060, 9.0.1157
app-editors/gvim - addressed in versions 9.0.0060, 9.0.1157
app-editors/vim-core - addressed in versions 9.0.0060, 9.0.1157
vim-motif (Ubuntu package) - update to 2:9.0.0242-1ubuntu1.3
EMC Cloud Tiering Appliance - update to 13.1.0.2.29
IBM Robotic Process Automation - update to 21.0.4

External References

Related Security Bulletins