Vulnerability in Vim Package: Double Free Issue Leading to Potential Crashes
Summary
UBUNTU-CVE-2024-41957: Vim is an open source command line text editor. Affects vim versions < 2:7.4.052-1ubuntu3.1+esm18. Fixed in 2:7.4.052-1ubuntu3.1+esm18. 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, code folding, and a powerful search functionality. However, a vulnerability has been identified in versions prior to 9.1.0647, which could lead to crashes under specific conditions.
Vulnerability Detail
The vulnerability arises from a double free error in the Vim source code, specifically in src/alloc.c:616. When a window is closed, the associated tagstack data is cleared and freed. If the quickfix list for that window 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 the user to execute Vim with non-default flags, it can lead to crashes, affecting user experience.
How To Fix
Minimum fixed version
2:7.4.052-1ubuntu3.1+esm18
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 temporary workaround, users can avoid using the specific flags that trigger the vulnerability when running Vim. However, the best course of action is to update to the patched version.
Conclusion
In summary, a double free vulnerability has been identified in Vim versions prior to 9.1.0647, which can lead to crashes under certain conditions. Users are strongly advised to update to the latest patched version to ensure their systems remain secure and stable.
See every vulnerability recorded for vim →
FAQ
The CVSS score of this vulnerability is 5.3, indicating a medium severity level.
Vim versions prior to 9.1.0647 are affected by this vulnerability.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
The main consequence is that Vim may crash when specific non-default flags are used, which can disrupt the user's workflow.
While the best solution is to update to the patched version, users can temporarily avoid using the flags that trigger the vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for vim.