Amazon Linux 2022 : vim-common, vim-data, vim-default-editor (ALAS2022-2022-116)

high Nessus Plugin ID 164766

Synopsis

The remote Amazon Linux 2022 host is missing a security update.

Description

It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2022-2022-116 advisory.

A heap buffer over-read vulnerability was found in Vim's grab_file_name() function of the src/findfile.c file. This flaw occurs because the function reads after the NULL terminates the line with gf in Visual block mode. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a heap buffer over-read vulnerability that causes an application to crash and corrupt memory.
(CVE-2022-1720)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to an out-of- bounds write vulnerability in the ex_cmds function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1785)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to a use after free vulnerability. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1796)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to an out-of- bounds read vulnerability in the gchar_cursor function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1851)

A heap buffer overflow flaw was found in Vim's utf_head_off() function in the mbyte.c file. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a heap buffer overflow that causes an application to crash, leading to a denial of service and possibly some amount of memory leak. (CVE-2022-1886)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to an out-of- bounds write vulnerability in the vim_regsub_both function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1897)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to a use-after- free vulnerability in the find_pattern_in_path function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1898)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to a buffer over- read vulnerability in the utf_ptr2char function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1927)

An out-of-bounds write vulnerability was found in Vim's vim_regsub_both() function in the src/regexp.c file. The flaw can open a command-line window from a substitute expression when a text or buffer is locked. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering an out-of-bounds write that causes an application to crash, possibly reading and modifying some amount of memory contents. (CVE-2022-1942)

A flaw was found in vim. The vulnerability occurs due to Illegal memory access and leads to a use-after- free vulnerability in the utf_ptr2char function. This flaw allows an attacker to input a specially crafted file, leading to a crash or code execution. (CVE-2022-1968)

An out-of-bounds write vulnerability was found in Vim's append_command() function of the src/ex_docmd.c file. This issue occurs when an error for a command goes over the end of IObuff. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a heap buffer overflow that causes an application to crash and corrupt memory. (CVE-2022-2000)

A heap use-after-free vulnerability was found in Vim's skipwhite() function of the src/charset.c file.
This flaw occurs because of an uninitialized attribute value and freed memory in the spell command. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a heap use- after-free that causes an application to crash and corrupt memory. (CVE-2022-2042)

Buffer Over-read in GitHub repository vim/vim prior to 8.2. (CVE-2022-2124)

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. (CVE-2022-2125)

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. (CVE-2022-2126)

Out-of-bounds Write in GitHub repository vim/vim prior to 8.2. (CVE-2022-2129)

A heap buffer over-read vulnerability was found in Vim's put_on_cmdline() function of the src/ex_getln.c file. This issue occurs due to invalid memory access when using an expression on the command line. This flaw allows an attacker to trick a user into opening a specially crafted file, triggering a heap buffer overflow that causes an application to crash and corrupt memory. (CVE-2022-2175)

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. (CVE-2022-2182)

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. (CVE-2022-2183)

Out-of-bounds Read in GitHub repository vim/vim prior to 8.2. (CVE-2022-2206)

Heap-based Buffer Overflow in GitHub repository vim/vim prior to 8.2. (CVE-2022-2207)

NULL Pointer Dereference in GitHub repository vim/vim prior to 8.2.5163. (CVE-2022-2208)

Out-of-bounds Write in GitHub repository vim/vim prior to 8.2. (CVE-2022-2210)

NULL Pointer Dereference in GitHub repository vim/vim prior to 8.2. (CVE-2022-2231)

Tenable has extracted the preceding description block directly from the tested product security advisory.

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

Solution

Run 'dnf update --releasever=2022.0.20220719 vim' to update your system.

See Also

https://alas.aws.amazon.com/AL2022/ALAS-2022-116.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3770.html

https://alas.aws.amazon.com/cve/html/CVE-2022-0554.html

https://alas.aws.amazon.com/cve/html/CVE-2022-0572.html

https://alas.aws.amazon.com/cve/html/CVE-2022-0629.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1616.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1619.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1620.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1621.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1629.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1674.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1720.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1725.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1733.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1735.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1769.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1771.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1785.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1796.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1851.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1886.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1897.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1898.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1927.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1942.html

https://alas.aws.amazon.com/cve/html/CVE-2022-1968.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2000.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2042.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2124.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2125.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2126.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2129.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2175.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2182.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2183.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2206.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2207.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2208.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2210.html

https://alas.aws.amazon.com/cve/html/CVE-2022-2231.html

Plugin Details

Severity: High

ID: 164766

File Name: al2022_ALAS2022-2022-116.nasl

Version: 1.10

Type: local

Agent: unix

Published: 9/6/2022

Updated: 12/11/2024

Supported Sensors: Agentless Assessment, Continuous Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

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

CVSS Score Source: CVE-2022-2210

CVSS v3

Risk Factor: High

Base Score: 7.8

Temporal Score: 7

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

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:vim-filesystem, p-cpe:/a:amazon:linux:vim-data, cpe:/o:amazon:linux:2022, p-cpe:/a:amazon:linux:vim-enhanced-debuginfo, p-cpe:/a:amazon:linux:vim-common, p-cpe:/a:amazon:linux:vim-minimal-debuginfo, p-cpe:/a:amazon:linux:vim-minimal, p-cpe:/a:amazon:linux:vim-common-debuginfo, p-cpe:/a:amazon:linux:vim-enhanced, p-cpe:/a:amazon:linux:vim-default-editor, p-cpe:/a:amazon:linux:vim-debuginfo, p-cpe:/a:amazon:linux:vim-debugsource

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 7/20/2022

Vulnerability Publication Date: 5/19/2022

Reference Information

CVE: CVE-2021-3770, CVE-2022-0554, CVE-2022-0572, CVE-2022-0629, CVE-2022-1616, CVE-2022-1619, CVE-2022-1620, CVE-2022-1621, CVE-2022-1629, CVE-2022-1674, CVE-2022-1720, CVE-2022-1725, CVE-2022-1733, CVE-2022-1735, CVE-2022-1769, CVE-2022-1771, CVE-2022-1785, CVE-2022-1796, CVE-2022-1851, CVE-2022-1886, CVE-2022-1897, CVE-2022-1898, CVE-2022-1927, CVE-2022-1942, CVE-2022-1968, CVE-2022-2000, CVE-2022-2042, CVE-2022-2124, CVE-2022-2125, CVE-2022-2126, CVE-2022-2129, CVE-2022-2175, CVE-2022-2182, CVE-2022-2183, CVE-2022-2206, CVE-2022-2207, CVE-2022-2208, CVE-2022-2210, CVE-2022-2231

IAVB: 2022-B-0049-S, 2023-B-0016-S