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
Acknowledgments: Name: Milos Malik (Red Hat)
The use of commands.getstatusoutput() was previously removed via the following commit: https://github.com/fedora-selinux/setroubleshoot/commit/5cd60033ea7f5bdf8c19c27b23ea2d773d9b09f5
(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.
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.
Lifting embargo.
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
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