Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 1662917[details]
CONFIGURATION RECOMMENDATIONS OF A GNU/LINUX SYSTEM (ANSSI GUIDELINE)
+++ This bug was initially created as a clone of Bug #1801314 +++
Description of problem:
As describe in CONFIGURATION RECOMMENDATIONS OF A GNU/LINUX SYSTEM (ANSSI GUIDELINE), there is a security issue to have:
allow_execstack: on
Allow unconfined executables to map a memory region as both executable and writable, this is dangerous
allow execmem: on
Allow unconfined executables to make their stack executable.
Steps to Reproduce:
1. semanage boolean -l | grep deny_execmem
2. semanage boolean -l | grep execstack
Actual results:
[root@controller-0 ~]# semanage boolean -l | grep deny_execmem
deny_execmem (off , off) Allow deny to execmem
[root@controller-0 ~]# semanage boolean -l | grep selinuxuser_execstack
selinuxuser_execstack (on , on) Allow selinuxuser to execstack
Expected results:
[root@controller-0 ~]# semanage boolean -l | grep deny_execmem
deny_execmem (on , on) Allow deny to execmem
[root@controller-0 ~]# semanage boolean -l | grep selinuxuser_execstack
selinuxuser_execstack (off , off) Allow selinuxuser to execstack
Additional info:
[1] https://lists.fedoraproject.org/pipermail/scm-commits/2011-November/681342.html
--- Additional comment from Julie Pichon on 2020-02-11 15:25:49 UTC ---
Hi Lukas,
I would like to ask for your thoughts on the two following booleans mentioned in the bug description:
deny_execmem (off , off) Allow deny to execmem
selinuxuser_execstack (on , on) Allow selinuxuser to execstack
According to recent security guidelines (cf. ANSSI document in the attachments), the recommendation is for these to always be set to on (deny_execmem) and off (selinuxuser_execstack) respectively. Would it make sense for the default selinux-policy to change to match the guidelines, do you think? Thank you.
If the deny_execmem boolean should be enabled by default then we need to instruct the desktop team to enable the xserver_execmem boolean. Otherwise following SELinux denials will appear:
----
type=PROCTITLE msg=audit(04/28/2020 10:24:42.377:313) : proctitle=/usr/bin/gnome-shell
type=SYSCALL msg=audit(04/28/2020 10:24:42.377:313) : arch=x86_64 syscall=mmap success=no exit=EACCES(Permission denied) a0=0x0 a1=0x1000 a2=PROT_READ|PROT_WRITE|PROT_EXEC a3=MAP_PRIVATE|MAP_ANONYMOUS items=0 ppid=3668 pid=3893 auid=unset uid=gdm gid=gdm euid=gdm suid=gdm fsuid=gdm egid=gdm sgid=gdm fsgid=gdm tty=tty1 ses=unset comm=gnome-shell exe=/usr/bin/gnome-shell subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(04/28/2020 10:24:42.377:313) : avc: denied { execmem } for pid=3893 comm=gnome-shell scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tclass=process permissive=0
----
The gnome-shell is not able to start.
Julie,
Thank you for bringing this issue on improving security of our products.
RHEL with SELinux is widely used in various customer environments. We cannot predict all of the impact of such important change though, so I am afraid we cannot afford to make such a change during the RHEL 8 development cycle. To declare stability and reliability, we have published the following document:
Stability of the SELinux Policy API
https://access.redhat.com/articles/4854201
I am closing the bz for now. However, as both suggestions seem to be reasonable, we can participate on a wider discussion if the default value can be changed in Fedora and in future RHEL major versions, and even include more booleans of similar kind to the discussion.