Bug 1332644 (CVE-2016-4444) - CVE-2016-4444 setroubleshoot-plugins: insecure commands.getstatusoutput use in the allow_execmod plugin
Summary: CVE-2016-4444 setroubleshoot-plugins: insecure commands.getstatusoutput use i...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-4444
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=important,public=20160621,repo...
Depends On: 1332411 1339369 1339370 1339372
Blocks: 1332645
TreeView+ depends on / blocked
 
Reported: 2016-05-03 15:57 UTC by Adam Mariš
Modified: 2019-06-08 21:10 UTC (History)
5 users (show)

Fixed In Version: setroubleshoot-plugins 3.2.23
Doc Type: Bug Fix
Doc Text:
A shell command injection flaw was found in the way the setroubleshoot allow_execmod plugin executed external commands. A local attacker able to trigger an execmod SELinux denial could use this flaw to execute arbitrary code with root privileges.
Clone Of:
Environment:
Last Closed: 2016-06-23 10:55:52 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1267 normal SHIPPED_LIVE Important: setroubleshoot and setroubleshoot-plugins security update 2016-06-22 01:24:18 UTC
Red Hat Product Errata RHSA-2016:1293 normal SHIPPED_LIVE Important: setroubleshoot and setroubleshoot-plugins security update 2016-06-23 12:52:54 UTC

Description Adam Mariš 2016-05-03 15:57:24 UTC
It was reported that execmod and execstack setroubleshoot plugins use commands.getstatusoutput("... %s ...") which can be misused in such a way when appropriate setroubleshoot plugin analyzes the AVC triggered by binary, setroubleshoot daemon executes arbitrary commands which are part of the binary filename.

Product bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1332411

Comment 1 Adam Mariš 2016-05-03 15:57:27 UTC
Acknowledgments:

Name: Milos Malik (Red Hat)

Comment 3 Tomas Hoger 2016-05-24 10:57:26 UTC
The use of commands.getstatusoutput() was previously removed via the following commit:

https://github.com/fedora-selinux/setroubleshoot/commit/5cd60033ea7f5bdf8c19c27b23ea2d773d9b09f5

Comment 6 Tomas Hoger 2016-05-24 13:22:07 UTC
(In reply to Adam Mariš from comment #0)
> It was reported that execmod and execstack setroubleshoot plugins use
> commands.getstatusoutput("... %s ...") which can be misused ...

The allow_execstack plugin uses commands.getoutput() instead, and has not been fixed in the past as allow_execmod plugin (see comment 3).  Therefore, the allow_execstack issue needs to be handled via separate bug / CVE.  A new bug 1339250 was filed for that issue.

Comment 8 Tomas Hoger 2016-05-25 12:57:48 UTC
This issue does not affect the default SELinux configuration, as the execmod is allowed by default for unconfined_t domain.  SELinux booleans allow_execmod (on Red Hat Enterprise Linux 6) or selinuxuser_execmod (on Red Hat Enterprise Linux 7) can be set to off to disallow execmod, and hence make it possible to generate execmod AVC, which triggers this bug.

The impact of this issue on Red Hat Enterprise Linux 7.2 and later is reduced, as setroubleshootd does not run with root privileges, but with privileges of a dedicated non-root user setroubleshoot.

Comment 9 Tomas Hoger 2016-06-21 11:37:40 UTC
Lifting embargo.

Comment 10 errata-xmlrpc 2016-06-21 21:24:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2016:1267 https://access.redhat.com/errata/RHSA-2016:1267

Comment 11 errata-xmlrpc 2016-06-23 08:53:09 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:1293 https://access.redhat.com/errata/RHSA-2016:1293


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