Bug 1339508 (CVE-2016-5026)

Summary: CVE-2016-5026 onionshare: /tmp usage race condition
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: pj.pandit, robyduck
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:52:40 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: 1339510, 1339511    
Bug Blocks:    

Description Andrej Nemec 2016-05-25 08:23:29 UTC
A vulnerability was found in the onionshare application. Onionshare uses /tmp/onionshare to create a temporary directory $HS that is then used for the creation of a tor hidden service, as HiddenServiceDir configuration.  Then, the tor daemon creates 2 files in $HS

But onionshare doesn't verify the owner or the exact permission of /tmp/onionshare.  So if a attacker pre-create a directory /tmp/onionshare with 777 permissions and him as a owner, he can use a race condition to inject his own files in the share.

References:

http://seclists.org/oss-sec/2016/q2/392

Vulnerable code:

https://github.com/micahflee/onionshare/blob/master/onionshare/hs.py#L105

Comment 1 Andrej Nemec 2016-05-25 08:24:05 UTC
Created onionshare tracking bugs for this issue:

Affects: fedora-all [bug 1339510]
Affects: epel-all [bug 1339511]

Comment 3 Product Security DevOps Team 2019-06-08 02:52:40 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.