CVEfocus › CVE database › CVE-2024-43790

CVE-2024-43790heap-buffer-overflow in do_search() in Vim < 9.1.0689

CVSS 4.5 MediumEPSS 0.4% (higher than 25% of CVEs)Published 2024-08-22Updated 2024-09-20Assigner: GitHub_M

Vim is an open source command line text editor. When performing a search and displaying the search-count message is disabled (:set shm+=S), the search pattern is displayed at the bottom of the screen in a buffer (msgbuf). When right-left mode (:set rl) is enabled, the search pattern is reversed. This happens by allocating a new buffer. If the search pattern contains some ASCII NUL characters, the buffer allocated will be smaller than the original allocated buffer (because for allocating the reversed buffer, the strlen() function is called, which only counts until it notices an ASCII NUL byte ) and thus the original length indicator is wrong. This causes an overflow when accessing characters inside the msgbuf by the previously (now wrong) length of the msgbuf. The issue has been fixed as of Vim patch v9.1.0689.

CWE-122

What to do

Fixed builds are available from Alpine, Debian: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
13Will not fix
22Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04vimNot affected
vulnerable_code_not_present
Ubuntu 22.04vimNot affected
vulnerable_code_not_present
Debian 14vimFixed2:9.1.0698-1DEBIAN-CVE-2024-43790
Debian 13vimFixed2:9.1.0698-1DEBIAN-CVE-2024-43790
Debian 12vimWill not fix
Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned.
DEBIAN-CVE-2024-43790
Red Hat Enterprise Linux 10vimNot affected
Red Hat Enterprise Linux 10vim-X11Not affected
Red Hat Enterprise Linux 10vim-commonNot affected
Red Hat Enterprise Linux 10vim-dataNot affected
Red Hat Enterprise Linux 10vim-enhancedNot affected
Red Hat Enterprise Linux 10vim-filesystemNot affected
Red Hat Enterprise Linux 10vim-minimalNot affected
Red Hat Enterprise Linux 10xxdNot affected
Red Hat Enterprise Linux 9vimNot affected
Red Hat Enterprise Linux 9vim-X11Not affected
Red Hat Enterprise Linux 9vim-commonNot affected
Red Hat Enterprise Linux 9vim-enhancedNot affected
Red Hat Enterprise Linux 9vim-filesystemNot affected
Red Hat Enterprise Linux 9vim-minimalNot affected
Red Hat Enterprise Linux 8vimNot affected
Red Hat Enterprise Linux 8vim-X11Not affected
Red Hat Enterprise Linux 8vim-commonNot affected
Red Hat Enterprise Linux 8vim-enhancedNot affected
Red Hat Enterprise Linux 8vim-filesystemNot affected
Red Hat Enterprise Linux 8vim-minimalNot affected
Red Hat Enterprise Linux 7vimWill not fix
Out of support scope
Red Hat Enterprise Linux 7vim-X11Will not fix
Out of support scope
Red Hat Enterprise Linux 7vim-commonWill not fix
Out of support scope
Red Hat Enterprise Linux 7vim-enhancedWill not fix
Out of support scope
Red Hat Enterprise Linux 7vim-filesystemWill not fix
Out of support scope
Red Hat Enterprise Linux 7vim-minimalWill not fix
Out of support scope
Red Hat Enterprise Linux 6vimWill not fix
Out of support scope
Red Hat Enterprise Linux 6vim-X11Will not fix
Out of support scope
Red Hat Enterprise Linux 6vim-commonWill not fix
Out of support scope
Red Hat Enterprise Linux 6vim-enhancedWill not fix
Out of support scope
Red Hat Enterprise Linux 6vim-filesystemWill not fix
Out of support scope
Red Hat Enterprise Linux 6vim-minimalWill not fix
Out of support scope
Alpine Linux 3.24vimFixed9.1.0707-r0ALPINE-CVE-2024-43790
Alpine Linux 3.23vimFixed9.1.0707-r0ALPINE-CVE-2024-43790
Alpine Linux 3.22vimFixed9.1.0707-r0ALPINE-CVE-2024-43790
Alpine Linux 3.21vimFixed9.1.0707-r0ALPINE-CVE-2024-43790
Alpine Linux 3.20vimFixed9.1.0707-r0ALPINE-CVE-2024-43790

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.