Bug 2151558 (CVE-2022-4292)

Summary: CVE-2022-4292 vim: use-after-free in did_set_spelllang() in src/spell.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: jburrell, zdohnal
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: vim 9.0.0882 Doc Type: If docs needed, set a value
Doc Text:
A heap use-after-free flaw was found in Vim's did_set_spelllang() function of the spell.c file. This issue occurs because vim uses freed memory after SpellFileMissing autocmd uses bwipe. This could allows an attacker to trick a user into opening a specially crafted file, triggering a heap use-after-free issue that causes an application to crash, possibly executing code and corrupting 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: 2151559, 2156271, 2156272    
Bug Blocks: 2151568    

Description Guilherme de Almeida Suckevicz 2022-12-07 13:56:14 UTC
Use After Free in GitHub repository vim/vim prior to 9.0.0882.

Reference:
https://huntr.dev/bounties/da3d4c47-e57a-451e-993d-9df0ed31f57b

Upstream patch:
https://github.com/vim/vim/commit/c3d27ada14acd02db357f2d16347acc22cb17e93

Comment 1 Guilherme de Almeida Suckevicz 2022-12-07 13:56:28 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 2151559]