Double Free Vulnerability in Vim Package Could Lead to Crashes
Summary
DEBIAN-CVE-2024-41957: Vim is an open source command line text editor. Affects vim versions < 2:9.1.0698-1. Fixed in 2:9.1.0698-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Vim is a widely used open-source command line text editor known for its efficiency and versatility. It supports various programming languages and offers features like syntax highlighting, multi-level undo, and customizable configurations. However, certain versions of Vim are vulnerable to a double free issue that can lead to application crashes under specific conditions.
Vulnerability Detail
The vulnerability arises from a double free in the source code file src/alloc.c at line 616. When a window is closed in Vim, the associated tagstack data is cleared and freed. Subsequently, if the quickfix list for that window also points to the same tagstack data, Vim attempts to free it again, resulting in a double-free or use-after-free access exception. Although the impact is considered low, as it requires users to execute Vim with specific non-default flags, it can lead to crashes, affecting user experience.
How To Fix
Minimum fixed version
2:9.1.0698-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade vim
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can avoid executing Vim with the specific flags that trigger the vulnerability until they can update to the patched version.
Conclusion
The double free vulnerability in Vim poses a risk of application crashes under specific conditions. Users are advised to update to the patched version to mitigate this risk. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for vim →
FAQ
Vim versions prior to 2:9.1.0698-1 are affected by this vulnerability.
The primary consequence is a crash of the Vim application when specific non-default flags are used.
You can use the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.
Yes, updating to the patched version 2:9.1.0698-1 resolves the vulnerability.
Vulert monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json, providing real-time insights without requiring code access.
References
Related vulnerabilities
Recent vulnerabilities recorded for vim.