Bug 19670 - nginx possible new security issue CVE-2016-1247
Summary: nginx possible new security issue CVE-2016-1247
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: All Packagers
QA Contact: Sec team
URL: http://lwn.net/Vulnerabilities/704698/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-27 14:43 CEST by David Walser
Modified: 2016-11-30 21:37 CET (History)
9 users (show)

See Also:
Source RPM: nginx-1.10.2-1.mga6.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2016-10-27 14:43:24 CEST
Debian has issued an advisory on October 25:
https://www.debian.org/security/2016/dsa-3701

It doesn't explain what ownership change it made.  Our package has:
%attr(-,%{nginx_user},%{nginx_group}) %dir %{nginx_logdir}

So, we may have the same issue.
Comment 1 Marja Van Waes 2016-10-27 18:36:32 CEST
Assigning to all packagers collectively, since there is no registered maintainer for this package.

CC: (none) => fundawang, guillomovitch, jquelin, marja11, sam, shlomif, thierry.vignaud
Assignee: bugsquad => pkg-bugs

Zombie Ryushu 2016-10-28 18:24:53 CEST

CC: (none) => zombie_ryushu
Whiteboard: (none) => https://www.debian.org/security/2016/dsa-3701

Comment 2 Mike Rambo 2016-11-11 14:48:21 CET
Found the following at http://metadata.ftp-master.debian.org/changelogs/main/n/nginx/nginx_1.6.2-5+deb8u4_changelog

nginx (1.6.2-5+deb8u3) jessie-security; urgency=high
[ Christos Trochalakis ]
* debian/nginx-common.postinst:
  + CVE-2016-1247: Secure log file handling (owner & permissions)
    against privilege escalation attacks. /var/log/nginx is now owned
    by root:adm. Thanks ro Dawid Golunski for the report.
    Changing /var/log/nginx permissions effectively reopens #701112,
    since log files can be world-readable. This is a trade-off until
    a better log opening solution is implemented upstream (trac:376).

and this at https://packetstormsecurity.com/files/cve/CVE-2016-1247

Debian Linux Security Advisory 3701-1 - Dawid Golunski reported 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. This security update changes ownership of the /var/log/nginx directory root. In addition, /var/log/nginx has to be made accessible to local users, and local users may be able to read the log files themselves local until the next logrotate invocation.


The current mga spec file has /var/log/nginx owned by nginx.nginx with permissions "%{__install} -d -m 0755 %{buildroot}%{nginx_logdir}". If I'm understanding this right it does look like we are vulnerable.

CC: (none) => mrambo

Comment 3 David Walser 2016-11-11 17:37:32 CET
Thanks Mike.  Maybe this is one you can fix once we get your account updated.

Whiteboard: https://www.debian.org/security/2016/dsa-3701 => (none)

Comment 4 Mike Rambo 2016-11-30 21:37:06 CET
Patched package nginx-1.10.2-2 which changes the ownership of the nginx log directory has been uploaded for Cauldron.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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