Use-after-free in Vim - CVE-2022-0156

 

Use-after-free in Vim - CVE-2022-0156

Published: February 22, 2022 / Updated: February 22, 2022


Vulnerability identifier: #VU60766
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-0156
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to compromise vulnerable system.

The vulnerability exists due to a use-after-free error when processing lines inside files. A remote attacker can trick the victim to open a specially crafted file, trigger a use-after-free error and execute arbitrary code on the system.

Successful exploitation of the vulnerability may allow an attacker to compromise vulnerable system.


Affected software

Vim
Amazon Linux AMI
Gentoo Linux
macOS
Ubuntu
Fedora
VMware Tanzu Application Service for VMs
Isolation Segment
VMware Tanzu Operations Manager
vim-athena (Ubuntu package)
xxd (Ubuntu package)
vim (Ubuntu package)
vim-tiny (Ubuntu package)
vim-gtk3 (Ubuntu package)
vim-nox (Ubuntu package)
vim
app-editors/gvim
app-editors/vim
app-editors/vim-core

How to mitigate CVE-2022-0156

Install updates from vendor's website.

Vim - update to 8.2.4040
macOS - addressed in versions 11.6.8 20G730, 12.3 21E230
VMware Tanzu Operations Manager - update to 3.0.14
vim-athena (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
xxd (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
vim (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
vim-tiny (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
vim-gtk3 (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
vim-nox (Ubuntu package) - update to 2:8.2.3995-1ubuntu2.9
vim - addressed in versions 8.2.4068-1.fc34, 8.2.4068-1.fc35
app-editors/gvim - update to 9.0.0060
app-editors/vim - update to 9.0.0060
app-editors/vim-core - update to 9.0.0060
vim - update to 9.0.1160-1.1

External References

Related Security Bulletins