Bug 1406729 (CVE-2016-9595)

Summary: CVE-2016-9595 katello-debug: Possible symlink attacks due to use of predictable file names
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bkearney, cbillett, egolov, mmccune, ohadlevy, security-response-team, tlestach
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: katello 3.4.0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in katello-debug where certain scripts and log files used insecure temporary files. A local user could exploit this flaw to conduct a symbolic-link attack, allowing them to overwrite the contents of arbitrary files.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 11:48:42 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: 1405387, 1414114, 1414115    
Bug Blocks: 1432305    
Attachments:
Description Flags
patch for the issue. none

Description Adam Mariš 2016-12-21 10:48:43 UTC
Evgeni Golov of Red Hat reports:


It was found that katello-debug.sh uses static, perfectly guessable paths in /tmp for its temporary files, which can lead to symlink attacks on /tmp/tasks_export.log and /tmp/pulp_running_tasks.js leading to overwritten files anywhere on the system (as katello-debug is run via sos as root), or code execution inside of mongo via /tmp/pulp_running_tasks.js if $user pre-creates that file and overwrites the file after command is echoed there, modifying it at his own will before calling mongo on it.

Product bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1405387

Comment 2 Bryan Kearney 2017-02-17 23:04:37 UTC
Created attachment 1255095 [details]
patch for the issue.

Comment 3 Kurt Seifried 2017-07-15 01:59:37 UTC
Acknowledgments:

Name: Evgeni Golov (Red Hat)

Comment 5 errata-xmlrpc 2018-02-21 12:25:28 UTC
This issue has been addressed in the following products:

  Red Hat Satellite 6.3 for RHEL 7

Via RHSA-2018:0336 https://access.redhat.com/errata/RHSA-2018:0336