RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1264977 - BUG: /selinux/checkreqprot should be set to 0 at boot
Summary: BUG: /selinux/checkreqprot should be set to 0 at boot
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.7
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1343211
TreeView+ depends on / blocked
 
Reported: 2015-09-21 19:07 UTC by Paul Moore
Modified: 2016-10-26 09:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-26 09:51:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0627 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-03-21 12:29:23 UTC

Description Paul Moore 2015-09-21 19:07:15 UTC
Description of problem:
We should set checkreqprot to 0 at boot to help prevent bypassing SELinux memory protections.  From the kernel Kconfig documentation:

  "This option sets the default value for the 'checkreqprot' flag
   that determines whether SELinux checks the protection requested
   by the application or the protection that will be applied by the
   kernel (including any implied execute for read-implies-exec) for
   mmap and mprotect calls.  If this option is set to 0 (zero),
   SELinux will default to checking the protection that will be applied
   by the kernel.  If this option is set to 1 (one), SELinux will
   default to checking the protection requested by the application."

Additional info:
This change is already present in Fedora.

Comment 1 Paul Moore 2015-09-21 19:08:27 UTC
Related RHEL7 BZ #1264968

Comment 2 Paul Moore 2015-10-29 12:35:05 UTC
Which package version has the fix?

Comment 3 Milos Malik 2015-11-02 12:10:37 UTC
I checked the 3.7.19-281.el6 build, but it doesn't contain the fix.

Comment 4 Paul Moore 2015-11-02 13:11:54 UTC
I'm going to reopen this BZ so we can clear this up; Miroslav, feel free to close this once you've provided the "Fixed in Version" information.

Comment 5 Miroslav Grepl 2015-11-09 14:45:23 UTC
Ok I meant RHEL7.

Comment 9 Simon Sekidde 2016-05-10 16:38:58 UTC
The solution for this would have to be in the spec file like Mirek noted in #c7
I will have to do more testing.

Comment 13 Florian Weimer 2016-10-25 16:36:52 UTC
The way this is set, through patching /etc/rc.local and adding

echo 0 > /selinux/checkreqprot

is really odd.  Is it a good idea to do it this way?

Comment 14 Lukas Vrabec 2016-10-26 09:51:06 UTC
Due to failing of rhbz#1388037 reverting this fix and CLOSING as WONTFIX.


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