Bug 2153519 (CVE-2022-4515)

Summary: CVE-2022-4515 ctags: arbitrary command execution via a tag file with a crafted filename
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: caswilli, feborges, kaycoth, mmaslano, security-response-team, tpopela, yamato
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 Exuberant Ctags in the way it handles the "-o" option. This option specifies the tag filename. A crafted tag filename specified in the command line or in the configuration file results in arbitrary command execution because the externalSortTags() in sort.c calls the system(3) function in an unsafe way.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 18:31:34 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: 2153787    
Bug Blocks: 2149169, 2153786    

Description Guilherme de Almeida Suckevicz 2022-12-14 17:03:09 UTC
A flaw was found in Exuberant Ctags in the way it handles the "-o" option, this option is used to specify the tag filename. A crafted tag filename specified in the command line or in the configuration file results in arbitrary command execution because the externalSortTags() in sort.c calls the system(3) function in an unsafe way.

Reference:
https://sourceforge.net/p/ctags/code/HEAD/tree/tags/ctags-5.8/sort.c#l56

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

  Red Hat Enterprise Linux 8

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

Comment 5 Product Security DevOps Team 2023-05-16 18:31:32 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-4515