CVE Vulnerabilities

CVE-2024-41957

Double Free

Published: Aug 01, 2024 | Modified: Nov 29, 2024
CVSS 3.x
5.3
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
CVSS 2.x
RedHat/V2
RedHat/V3
4.5 LOW
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Ubuntu
MEDIUM

Vim is an open source command line text editor. Vim < v9.1.0647 has double free in src/alloc.c:616. When closing a window, the corresponding tagstack data will be cleared and freed. However a bit later, the quickfix list belonging to that window will also be cleared and if that quickfix list points to the same tagstack data, Vim will try to free it again, resulting in a double-free/use-after-free access exception. Impact is low since the user must intentionally execute vim with several non-default flags, but it may cause a crash of Vim. The issue has been fixed as of Vim patch v9.1.0647

Weakness

The product calls free() twice on the same memory address, potentially leading to modification of unexpected memory locations.

Affected Software

Name Vendor Start Version End Version
Vim Vim * 9.1.0647 (excluding)
Vim Ubuntu devel *
Vim Ubuntu esm-infra/bionic *
Vim Ubuntu esm-infra/xenial *
Vim Ubuntu focal *
Vim Ubuntu jammy *
Vim Ubuntu noble *
Vim Ubuntu trusty/esm *
Vim Ubuntu upstream *

Potential Mitigations

References