Bug 2039846 (CVE-2022-0158)

Summary: CVE-2022-0158 vim: heap-based read buffer overflow in compile_get_env()
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bdettelb, caswilli, dhalasz, fjansen, gchamoul, jburrell, jwong, karsten, kaycoth, micjohns, sthirugn, vkrizan, vkumar, vmugicag, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vim 8.2.4049 Doc Type: If docs needed, set a value
Doc Text:
It was found that vim was vulnerable to a 1 byte heap based out of bounds read flaw in the `compile_get_env()` function. A file could use that flaw to disclose 1 byte of vim's internal memory.
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: 2039848, 2040325, 2043462    
Bug Blocks: 2039688    

Comment 1 Marian Rehak 2022-01-12 14:33:14 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 2039848]

Comment 5 Cedric Buissart 2022-01-13 13:46:06 UTC
This flaw does not affect vim versions prior to 8.2. 
Since it is a 1 byte out of bound read, it would not be sufficient to crash vim (except if recompiled with an address sanitizer)