CVE-2024-43802
Fixed in a distro release EPSS <1%CVSS 4.5
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 tb_off 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. ins_typebuf(). 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.
Products: vim
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Alpine 3.20 | vim | 9.1.0707-r0 |
| Alpine 3.21 | vim | 9.1.0707-r0 |
| Alpine 3.22 | vim | 9.1.0707-r0 |
| Alpine 3.23 | vim | 9.1.0707-r0 |
| Amazon Linux 2 | vim-X11 | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | vim-common | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | vim-data | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | vim-enhanced | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | vim-filesystem | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | vim-minimal | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2 | xxd | 2:9.0.2153-1.amzn2.0.2 |
| Amazon Linux 2023 | vim-common | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | vim-data | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | vim-default-editor | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | vim-enhanced | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | vim-filesystem | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | vim-minimal | 2:9.1.785-1.amzn2023.0.1 |
| Amazon Linux 2023 | xxd | 2:9.1.785-1.amzn2023.0.1 |
| Chainguard | vim | 9.1.0698-r0 |
| Debian 11 | vim | 2:8.2.2434-3+deb11u2 |
| Debian 12 | vim | 2:9.0.1378-2+deb12u1 |
| Debian 13 | vim | 2:9.1.0698-1 |
| Debian 14 | vim | 2:9.1.0698-1 |
| SUSE Linux Enterprise Micro 5.1 | vim | 9.1.1101-150000.5.69.1 |
| SUSE Linux Enterprise Micro 5.2 | vim | 9.1.1101-150000.5.69.1 |
| SUSE Linux Enterprise Micro 5.3 | vim | 9.1.1101-150000.5.69.1 |
| SUSE Linux Enterprise Micro 5.4 | vim | 9.1.1101-150000.5.69.1 |
| SUSE Linux Enterprise Micro 5.5 | vim | 9.1.1101-150500.20.21.1 |
| SUSE Linux Enterprise Module for Basesystem 15 SP6 | vim | 9.1.1101-150500.20.21.1 |
| SUSE Linux Enterprise Module for Desktop Applications 15 SP6 | vim | 9.1.1101-150500.20.21.1 |
| SUSE Linux Enterprise Server LTSS Extended Security 12 SP5 | vim | 9.1.1101-17.41.1 |
| SUSE Linux Micro 6.0 | vim | 9.1.1101-1.1 |
| Ubuntu 20.04 LTS | vim | 2:8.1.2269-1ubuntu5.25 |
| Ubuntu 22.04 LTS | vim | 2:8.2.3995-1ubuntu2.19 |
| Ubuntu 24.04 LTS | vim | 2:9.1.0016-1ubuntu7.3 |
| Ubuntu Pro 14.04 LTS | vim | 2:7.4.052-1ubuntu3.1+esm19 |
| Ubuntu Pro 16.04 LTS | vim | 2:7.4.1689-3ubuntu1.5+esm25 |
| Ubuntu Pro 18.04 LTS | vim | 2:8.0.1453-1ubuntu1.13+esm10 |
| Wolfi | vim | 9.1.0698-r0 |
| openSUSE Leap 15.6 | vim | 9.1.1101-150500.20.21.1 |