Bug 839735

Summary: openssl: environment settings honored when used in privileged apps
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fweimer, mturk, security-response-team, tmraz
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-30 13:33:39 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: 911051, 911052, 911061, 911063    
Bug Blocks: 839918, 919304    
Attachments:
Description Flags
Portability patch for __secure_getenv() none

Description Tomas Hoger 2012-07-12 16:53:50 UTC
OpenSSL library reads certain settings from environment variables.  Certain settings, such as OPENSSL_CONF containing path to an openssl.cnf configuration file, are read even when OpenSSL library is used in an application running with elevated privileges (setuid or setgid application, application with file system capabilities).  This may allow local attacker to escalate their privileges.

Some getenv() call already protected by calls to OPENSSL_issetugid() and not read in setuid or setgid applications, but it's implementation does not take into an account file system capabilities.

Following upstream ticket contains a proposed patch with several improvements:
http://rt.openssl.org/Ticket/Display.html?id=2532&user=guest&pass=guest

Comment 11 Huzaifa S. Sidhpurwala 2013-02-14 10:07:59 UTC
This is public via:

http://rt.openssl.org/Ticket/Display.html?id=2532

Comment 12 Fedora Update System 2013-03-02 19:55:24 UTC
openssl-1.0.1e-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 errata-xmlrpc 2013-03-04 21:15:41 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6

Via RHSA-2013:0587 https://rhn.redhat.com/errata/RHSA-2013-0587.html

Comment 14 Fedora Update System 2013-03-08 00:02:10 UTC
openssl-1.0.0k-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Tomas Mraz 2013-03-27 07:59:06 UTC
Created attachment 716927 [details]
Portability patch for __secure_getenv()

This patch which needs to be applied in addition to the ...-secure-getenv.patch adds implementation of __secure_getenv() on non-linux platforms.

Comment 19 Mladen Turk 2013-03-27 09:34:14 UTC
The portability patch for __secure_getenv() works as expected on non-linux platforms.