Bug 2161349 (CVE-2023-0054)

Summary: CVE-2023-0054 vim: out-of-bounds write in do_string_sub() in eval.c
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds write flaw was found in Vim, in the do_string_sub function in the eval.c file. The issue occurs because of an invalid memory access due to a missing check of the return value of the vim_regsub function when a specially crafted input is processed. This flaw allows an attacker who can trick a user into opening a specially crafted file to trigger the out-of-bounds write, causing the application to crash.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2161353, 2161374, 2161375    
Bug Blocks: 2159622    

Description Guilherme de Almeida Suckevicz 2023-01-16 16:53:12 UTC
Out-of-bounds Write in GitHub repository vim/vim prior to 9.0.1145.

Reference:
https://huntr.dev/bounties/b289ee0f-fd16-4147-bd01-c6289c45e49d

Upstream patch:
https://github.com/vim/vim/commit/3ac1d97a1d9353490493d30088256360435f7731

Comment 1 Guilherme de Almeida Suckevicz 2023-01-16 17:11:52 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 2161353]