Double-Free Vulnerability in Vim: Potential Crash Risk
Summary
UBUNTU-CVE-2024-41965: Vim is an open source command line text editor. Affects vim versions 2:7.4.000-1ubuntu2 – 2:7.4.052-1ubuntu3.1+esm9. No fix is published. 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 in text manipulation. It supports various programming languages and offers features like syntax highlighting, multi-level undo, and extensive customization through plugins. However, a vulnerability has been identified in Vim versions prior to v9.1.0648, which can lead to a double-free error, potentially causing crashes and instability.
Vulnerability Detail
The vulnerability arises from a double-free error in the function dialog_changed() within Vim versions earlier than v9.1.0648. When a user abandons a buffer and opts to save changes, Vim may create a new Untitled file if the buffer lacks a name. During this process, Vim incorrectly frees a pointer twice when setting the buffer name to Unnamed. This double-free can lead to a heap-use-after-free condition, resulting in crashes or unexpected behavior in the application.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can avoid abandoning buffers with unsaved changes or refrain from using the dialog that prompts for saving changes until the patch is applied.
Conclusion
The double-free vulnerability in Vim poses a risk of crashes and instability for users of affected versions. It is crucial to update to the patched version v9.1.0648 to ensure the security and reliability of the text editor. Users are encouraged to monitor their applications for vulnerabilities using tools like Vulert.
See every vulnerability recorded for vim →
FAQ
The CVSS score for this vulnerability is 4.2, indicating a medium severity level.
All versions of Vim prior to v9.1.0648 are affected by this vulnerability.
If you do not update Vim, you may experience crashes or unexpected behavior when using the editor, especially when handling modified buffers.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
Yes, you can avoid abandoning modified buffers or refrain from using the save dialog until the patch is applied as a temporary mitigation strategy.
References
Related vulnerabilities
Recent vulnerabilities recorded for vim.