Heap-based buffer overflow in Vim - CVE-2022-4141

 

Heap-based buffer overflow in Vim - CVE-2022-4141

Published: December 13, 2022


Vulnerability identifier: #VU70130
CSH Severity: Medium
CVSS v4: 7.1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-4141
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error. A remote attacker can trick the victim to execute the CTRL-W gf in the expression used in the RHS of the substitute command, trigger a heap-based buffer overflow and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

Vim
Amazon Linux AMI
Gentoo Linux
SUSE CaaS Platform
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Linux Enterprise Micro
openSUSE Leap Micro
SUSE Enterprise Storage
SUSE OpenStack Cloud
SUSE OpenStack Cloud Crowbar
SUSE Linux Enterprise Server
SUSE Linux Enterprise Server for SAP
Slackware Linux
SUSE Linux Enterprise High Performance Computing
SUSE Linux Enterprise Realtime Extension
SUSE Linux Enterprise Module for Basesystem
SUSE Linux Enterprise Module for Desktop Applications
SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Desktop
openSUSE Leap
openEuler
Fedora
Dell EMC PowerProtect Data Protection
Dell Data Protection Central
PowerStore T
Enterprise SONiC
EMC ViPR SRM
Dell EMC Storage Monitoring and Reporting (SMR)
IBM Watson Speech Services Cartridge for IBM Cloud Pak for Data
RecoverPoint for VMs
Dell EMC VxRail Appliance
vim-enhanced
vim-X11
vim-debugsource
vim-minimal
vim-common
vim
vim-debuginfo
vim-filesystem
vim-gvim
vim-data
vim-small
vim-small-debuginfo
vim-data-common
gvim
gvim-debuginfo
app-editors/vim-core
app-editors/vim
app-editors/gvim

How to mitigate CVE-2022-4141

Install updates from vendor's website.

Vim - update to 9.0.0947
PowerStore T - update to 3.5.0.1-2083289
Enterprise SONiC - update to 4.1.2
EMC ViPR SRM - update to 4.9.0.0
Dell EMC Storage Monitoring and Reporting (SMR) - update to 4.9.0.0
IBM Watson Speech Services Cartridge for IBM Cloud Pak for Data - update to 5.0.1
RecoverPoint for VMs - update to 6.0.SP1.P1
Dell EMC VxRail Appliance - update to 7.0.411
vim-enhanced - update to 9.0-3
vim-X11 - update to 9.0-3
vim-debugsource - update to 9.0-3
vim-minimal - update to 9.0-3
vim-common - update to 9.0-3
vim - update to 9.0-3
vim-debuginfo - update to 9.0-3
vim-filesystem - update to 9.0-3
vim - addressed in versions 9.0.1006-1.fc36, 9.0.1006-1.fc37
vim - addressed in versions 9.0.1006-1.1, 9.0.1160-1.1
vim-gvim - update to 9.0.1034
vim - update to 9.0.1034
vim-data - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
vim-debuginfo - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
vim-debugsource - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
vim-small - update to 9.0.1040-150000.5.31.1
vim-small-debuginfo - update to 9.0.1040-150000.5.31.1
vim-data-common - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
gvim - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
gvim-debuginfo - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
vim - addressed in versions 9.0.1040-150000.5.31.1, 9.0.1234-17.12.1
app-editors/vim-core - update to 9.0.1157
app-editors/vim - update to 9.0.1157
app-editors/gvim - update to 9.0.1157

External References

Related Security Bulletins