Bug 2149380 (CVE-2022-45939)

Summary: CVE-2022-45939 emacs: ctags local command execution vulnerability
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: jmigacz
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Etags, the Ctags implementation of Emacs. A file with a crafted filename may result in arbitrary command execution when processed by Etags.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-17 02:32:29 UTC 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: 2149381, 2149386, 2149387    
Bug Blocks: 2149382    

Description Guilherme de Almeida Suckevicz 2022-11-29 18:46:00 UTC
GNU Emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file, because lib-src/etags.c uses the system C library function in its implementation of the ctags program. For example, a victim may use the "ctags *" command (suggested in the ctags documentation) in a situation where the current working directory has contents that depend on untrusted input.

Reference and upstream patch:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51

Comment 1 Guilherme de Almeida Suckevicz 2022-11-29 18:46:19 UTC
Created emacs tracking bugs for this issue:

Affects: fedora-all [bug 2149381]

Comment 3 errata-xmlrpc 2023-05-09 07:35:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:2366 https://access.redhat.com/errata/RHSA-2023:2366

Comment 4 errata-xmlrpc 2023-05-16 08:46:38 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:3042 https://access.redhat.com/errata/RHSA-2023:3042

Comment 5 Product Security DevOps Team 2023-05-17 02:32:27 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-45939

Comment 7 errata-xmlrpc 2024-03-05 17:05:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:1103 https://access.redhat.com/errata/RHSA-2024:1103