Bug 1390182 (CVE-2016-1247)

Summary: CVE-2016-1247 nginx: Local privilege escalation via log files
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: affix, athmanem, bperkins, dmoppert, hhorak, icesalov, jeremy, jkaluza, jorton, luhliari, pavel.lisy, peter.borsa, webstack-team, wtogami
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 vulnerability was discovered in nginx. An attacker who could already run commands under the nginx user id could use this access to append data to files owned by root, potentially elevating their own privileges to root.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-15 04:50:18 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: 1390183, 1390184, 1910628    
Bug Blocks: 1390186    

Description Andrej Nemec 2016-10-31 12:22:00 UTC
It was reported that the nginx web server packages in Debian suffered from a > privilege escalation vulnerability (www-data to root) due to the way log files > are handled.

Debian bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842295

Comment 1 Andrej Nemec 2016-10-31 12:24:05 UTC
Created nginx tracking bugs for this issue:

Affects: fedora-all [bug 1390183]
Affects: epel-all [bug 1390184]

Comment 2 Doran Moppert 2016-10-31 23:39:49 UTC
Default SELinux policies on RHEL and Fedora protect against this flaw by limiting the files nginx's (uid 0) logging process can write to (httpd_log_t).

Only systems running with `setenforce 0` or running nginx unconfined are vulnerable to privilege escalation.

With SELinux enforcing, it may still be possible for an attacker to redirect nginx's access.log output to another file labelled with httpd_log_t, but the consequences of such an attack are minimal.

Comment 4 Doran Moppert 2016-11-03 23:44:31 UTC
To exploit this flaw, an attacker must first be able to run code under the nginx uid.  This is only possible if the attacker already has administrative privileges, or has used another vulnerability to gain such access.

Comment 5 Doran Moppert 2016-11-15 04:48:51 UTC
Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.