CVE-2024-43802: heap-buffer-overflow in ins_typebuf() in Vim < 9.1.0697
heap-buffer-overflow in instypebuf() in Vim < 9.1.0697
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Vim is an improved version of the unix vi text editor. When flushing the typeahead buffer, Vim moves the current position in the typeahead buffer but does not check whether there is enough space left in the buffer to handle the next characters. So this may lead to the tboff position within the typebuf variable to point outside of the valid buffer size, which can then later lead to a heap-buffer overflow in e.g. instypebuf(). Therefore, when flushing the typeahead buffer, check if there is enough space left before advancing the off position. If not, fall back to flush current typebuf contents. It's not quite clear yet, what can lead to this situation. It seems to happen when error messages occur (which will cause Vim to flush the typeahead buffer) in comnination with several long mappgins and so it may eventually move the off position out of a valid buffer size. Impact is low since it is not easily reproducible and requires to have several mappings active and run into some error condition. But when this happens, this will cause a crash. The issue has been fixed as of Vim patch v9.1.0697. Users are advised to upgrade. There are no known workarounds for this issue.
— NVD
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2024-43802?
The severity of CVE-2024-43802 has not been explicitly assessed but it is important to monitor for updates.
How do I fix CVE-2024-43802?
To fix CVE-2024-43802, update to version 2:9.1.0967-2 or a newer version of the affected vim package.
Which versions of Vim are affected by CVE-2024-43802?
CVE-2024-43802 affects Vim versions up to and including 2:8.2.2434-3+deb11u1 and 2:9.0.1378-2.
Is CVE-2024-43802 a critical vulnerability?
While the criticality of CVE-2024-43802 hasn't been officially rated, it is essential to apply the recommended updates to mitigate risks.
What software distribution includes the vulnerable version of Vim related to CVE-2024-43802?
Debian is one of the software distributions that includes the vulnerable versions of Vim related to CVE-2024-43802.