Bug 2262999 (CVE-2024-22667)

Summary: CVE-2024-22667 vim: Stack buffer over flow in did_set_langmap function in map.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: mcascell, saroy, thoger, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vim 9.0.2142 Doc Type: If docs needed, set a value
Doc Text:
A stack-based buffer overflow flaw was found in Vim. The did_set_langmap function in map.c calls sprintf to write to the error buffer that is passed down to the option callback functions. That buffer can be overflown, possibly leading to memory corruption and escalation of privileges.
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: 2263000    
Bug Blocks: 2263002    

Description Pedro Sampaio 2024-02-06 13:36:49 UTC
Vim before 9.0.2142 has a stack-based buffer overflow because did_set_langmap in map.c calls sprintf to write to the error buffer that is passed down to the option callback functions.

References:

https://gist.githubusercontent.com/henices/2467e7f22dcc2aa97a2453e197b55a0c/raw/7b54bccc9a129c604fb139266f4497ab7aaa94c7/gistfile1.txt
https://github.com/vim/vim/commit/b39b240c386a5a29241415541f1c99e2e6b8ce47

Comment 1 Pedro Sampaio 2024-02-06 13:37:46 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 2263000]