Bug 2073013 (CVE-2022-1154) - CVE-2022-1154 vim: use after free in utf_ptr2char
Summary: CVE-2022-1154 vim: use after free in utf_ptr2char
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-1154
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2073014 2073389 2073390 2073391 2073392 2073393 2073394
Blocks: 2073017
TreeView+ depends on / blocked
 
Reported: 2022-04-07 13:17 UTC by Marian Rehak
Modified: 2022-08-16 05:03 UTC (History)
7 users (show)

Fixed In Version: vim 8.2.4646
Doc Type: If docs needed, set a value
Doc Text:
A heap use-after-free vulnerability was found in Vim's utf_ptr2char() function of the src/mbyte.c file. This flaw occurs because vim is using a buffer line after it has been freed in the old regexp engine. 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, possibly executing code and corrupting memory.
Clone Of:
Environment:
Last Closed: 2022-07-01 09:26:09 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:1552 0 None None None 2022-04-26 21:50:18 UTC
Red Hat Product Errata RHSA-2022:5242 0 None None None 2022-06-28 14:58:23 UTC

Description Marian Rehak 2022-04-07 13:17:04 UTC
Use after free in utf_ptr2char capable of crashing software, Bypass Protection Mechanism, Modify Memory, and possible remote execution.

Reference:

https://huntr.dev/bounties/7f0ec6bc-ea0e-45b0-8128-caac72d23425
https://github.com/vim/vim/commit/b55986c52d4cd88a22d0b0b0e8a79547ba13e1d5

Comment 1 Marian Rehak 2022-04-07 13:17:19 UTC
Created vim tracking bugs for this issue:

Affects: fedora-all [bug 2073014]

Comment 5 Todd Cullum 2022-04-22 23:46:21 UTC
Note that this is not a "remote execution" situation; the only way to trigger this is by opening a file with Vim. Yes, potentially Vim could be set up to automatically open untrusted files submitted to it, but under typical use-cases, this would not be considered a remote code execution vulnerability in the same manner of say a server that receives a network packet and can suddenly be taken over by an attacker via the Internet.

Comment 6 errata-xmlrpc 2022-04-26 21:50:15 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1552 https://access.redhat.com/errata/RHSA-2022:1552

Comment 8 errata-xmlrpc 2022-06-28 14:58:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:5242 https://access.redhat.com/errata/RHSA-2022:5242

Comment 9 Product Security DevOps Team 2022-07-01 09:26:06 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-1154


Note You need to log in before you can comment on or make changes to this bug.