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

 

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

Published: June 27, 2022


Vulnerability identifier: #VU64721
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-1942
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 in buffer.c. A remote attacker can trick the victim to open a specially crafted file, 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
Ubuntu
openEuler
Fedora
macOS
Isolation Segment
VMware Tanzu Application Service for VMs
vim-gnome (Ubuntu package)
vim-gtk (Ubuntu package)
vim-nox (Ubuntu package)
vim-tiny (Ubuntu package)
vim (Ubuntu package)
vim-athena (Ubuntu package)
vim-gtk3 (Ubuntu package)
vim
vim-debugsource
vim-filesystem
vim-X11
vim-minimal
vim-debuginfo
vim-common
vim-enhanced
app-editors/vim-core
app-editors/vim
app-editors/gvim
vim-motif (Ubuntu package)
cflinuxfs3
VMware Tanzu Operations Manager

How to mitigate CVE-2022-1942

Install updates from vendor's website.

Vim - update to 8.2.5043
vim-gnome (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:8.0.1453-1ubuntu1.12
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
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 (Ubuntu package) - addressed in versions Ubuntu Pro (Infra-only), 2:7.4.16893ubuntu1.5+esm10, 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
cflinuxfs3 - update to 0.360.0
VMware Tanzu Operations Manager - update to 3.0.8
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 - update to 8.2-35
vim-debugsource - update to 8.2-35
vim-filesystem - update to 8.2-35
vim-X11 - update to 8.2-35
vim-minimal - update to 8.2-35
vim-debuginfo - update to 8.2-35
vim-common - update to 8.2-35
vim-enhanced - update to 8.2-35
vim - update to 8.2.5052-1.fc35
vim - addressed in versions 8.2.5172-1.1, 9.0.1160-1.1
app-editors/vim-core - addressed in versions 9.0.0060, 9.0.1157
app-editors/vim - addressed in versions 9.0.0060, 9.0.1157
app-editors/gvim - addressed in versions 9.0.0060, 9.0.1157
vim-motif (Ubuntu package) - update to 2:9.0.0242-1ubuntu1.3
macOS - update to 13.0 22A380

External References

Related Security Bulletins