Vim < 9.1.0689 Heap Buffer Overflow

medium Nessus Plugin ID 206347

Synopsis

A text editor installed on the remote Windows host is affected by a heap buffer overflow vulnerability.

Description

The version of Vim installed on the remote Windows host is after 9.1.0425 and prior to 9.1.0689. It is, therefore, affected by a heap buffer overflow vulnerability. 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.

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Vim version 9.1.0689 or later.

See Also

https://github.com/vim/vim/security/advisories/GHSA-v2x2-cjcg-f9jm

Plugin Details

Severity: Medium

ID: 206347

File Name: vim_9_1_0689.nasl

Version: 1.1

Type: local

Agent: windows

Family: Windows

Published: 8/30/2024

Updated: 8/30/2024

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 4.9

CVSS v2

Risk Factor: Low

Base Score: 3.7

Vector: CVSS2#AV:L/AC:H/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2024-43790

CVSS v3

Risk Factor: Medium

Base Score: 4.5

Vector: CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Vulnerability Information

CPE: cpe:/a:vim:vim

Required KB Items: SMB/Registry/Enumerated, installed_sw/Vim

Patch Publication Date: 5/21/2024

Vulnerability Publication Date: 8/22/2024

Reference Information

CVE: CVE-2024-43790

IAVA: 2024-A-0526