Hide Forgot
It was reported that Tomcat packages in Red Hat Enterprise Linux 7 are vulnerable to local privilege escalation from tomcat group user to root. Tomcat configuration file located at /usr/lib/tmpfiles.d/tomcat.conf can be modified by any user belonging to tomcat group. This file is used by /usr/bin/systemd-tmpfiles service to create temporary files. As the systemd-tmpfiles service runs with root permissions, this enables the tomcat user to gain root privileges by editing the /usr/lib/tmpfiles.d/tomcat.conf file to contain a line which will cause the systemd-tmpfiles to create files within arbitrary system directory and arbitrary permissions. External Reference: http://legalhackers.com/advisories/Tomcat-RedHat-based-Root-Privilege-Escalation-Exploit.txt
Acknowledgments: Name: Dawid Golunski (http://legalhackers.com)
Created tomcat tracking bugs for this issue: Affects: fedora-all [bug 1383210]
Public via: http://seclists.org/oss-sec/2016/q4/78
Out of interest, would SELinux policy prevent the tomcat user from writing to this file anyway?
I'm afraid it won't. Query the SELinux policy: $ sesearch --allow -s tomcat_t -t lib_t -c file -p write Found 1 semantic av rules: allow files_unconfined_type file_type : file { [...] write [...] } ; It appears tomcat_t has the files_unconfined_type attribute, which means the SELinux policy puts very little restrictions on it.
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2016:2046 https://rhn.redhat.com/errata/RHSA-2016-2046.html