Bug 2153519 (CVE-2022-4515) - CVE-2022-4515 ctags: arbitrary command execution via a tag file with a crafted filename
Summary: CVE-2022-4515 ctags: arbitrary command execution via a tag file with a crafte...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-4515
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2153787
Blocks: 2149169 2153786
TreeView+ depends on / blocked
 
Reported: 2022-12-14 17:03 UTC by Guilherme de Almeida Suckevicz
Modified: 2023-05-16 18:31 UTC (History)
7 users (show)

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.
Clone Of:
Environment:
Last Closed: 2023-05-16 18:31:34 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:2863 0 None None None 2023-05-16 08:21:09 UTC

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


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