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 1395704 - unexpected USER_AVCs appear when the xserver_object_manage boolean is enabled
Summary: unexpected USER_AVCs appear when the xserver_object_manage boolean is enabled
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1393066
TreeView+ depends on / blocked
 
Reported: 2016-11-16 13:36 UTC by Milos Malik
Modified: 2019-07-25 14:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2016-11-16 13:36:53 UTC
Description of problem:
* audit2allow says
#!!!! This avc can be allowed using the boolean 'xserver_object_manager'
allow staff_t root_xdrawable_t:x_drawable manage;

* but the xserver_object_manager boolean was enabled
# grep -i selinux /var/log/Xorg.*
/var/log/Xorg.0.log:[  6075.362] (II) SELinux: Configured in enforcing mode
/var/log/Xorg.0.log.old:[  5470.542] (II) SELinux: Configured in enforcing mode

* if the xserver_object_manager boolean was disabled then the SELinux extension for X server wouldn't be active at all

Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-102.el7_3.6.noarch
selinux-policy-devel-3.13.1-102.el7_3.6.noarch
selinux-policy-doc-3.13.1-102.el7_3.6.noarch
selinux-policy-minimum-3.13.1-102.el7_3.6.noarch
selinux-policy-mls-3.13.1-102.el7_3.6.noarch
selinux-policy-sandbox-3.13.1-102.el7_3.6.noarch
selinux-policy-targeted-3.13.1-102.el7_3.6.noarch
xorg-x11-server-common-1.17.2-22.el7.x86_64
xorg-x11-server-utils-7.7-14.el7.x86_64
xorg-x11-server-Xdmx-1.17.2-22.el7.x86_64
xorg-x11-server-Xephyr-1.17.2-22.el7.x86_64
xorg-x11-server-Xnest-1.17.2-22.el7.x86_64
xorg-x11-server-Xorg-1.17.2-22.el7.x86_64
xorg-x11-server-Xspice-0.1.1-18.el7.x86_64
xorg-x11-server-Xvfb-1.17.2-22.el7.x86_64

How reproducible:
* always

Steps to Reproduce:
1. get a RHEL-7.3 machine (targeted policy is active)
2. enable the xserver_object_manager boolean
3. create /etc/X11/xorg.conf.d/selinux.conf which has following content:
Section "Module"
    SubSection "extmod"
        Option "SELinux mode enforcing"
    EndSubSection
EndSection
4. restart X server
5. log into X session as staff_u user
6. search for SELinux denials

Actual results:
----
type=USER_AVC msg=audit(11/16/2016 13:53:49.108:649) : pid=6828 uid=root auid=unset ses=unset subj=system_u:system_r:xserver_t:s0-s0:c0.c1023 msg='avc:  denied  { manage } for request=X11:ChangeWindowAttributes comm=/usr/bin/gnome-shell resid=276 restype=WINDOW scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:object_r:root_xdrawable_t:s0 tclass=x_drawable  exe=/usr/bin/Xorg sauid=root hostname=? addr=? terminal=?' 
----

# getsebool xserver_object_manager 
xserver_object_manager --> on
# sesearch -s staff_t -t root_xdrawable_t -c x_drawable -DAC -p manage
Found 1 semantic av rules:
DF allow x_domain xdrawable_type : x_drawable { create destroy read write blend getattr setattr list_child add_child remove_child list_property get_property set_property manage override show hide send receive } ; [ xserver_object_manager ]

#

Expected results:
* above-mentioned allow rule should be enabled when the boolean is enabled

Comment 2 Milos Malik 2017-08-17 11:06:20 UTC
Let's test it on Fedora first.

Comment 3 Lukas Vrabec 2017-10-12 12:20:49 UTC
We're going to close this bug as WONTFIX because

 * of limited capacity of selinux-policy developers
 * the bug is related to EPEL component or 3rd party SW only
 * the bug appears in unsupported configuration 

We believe this bug can be fixed via a local policy module.
For more information please see: 

 * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-security-enhanced_linux-troubleshooting-fixing_problems#sect-Security-Enhanced_Linux-Fixing_Problems-Allowing_Access_audit2allow

If you disagree, please re-open the bug.

Comment 4 Lukas Vrabec 2017-10-12 12:22:13 UTC
We're going to close this bug as WONTFIX because

 * of limited capacity of selinux-policy developers
 * the bug is related to EPEL component or 3rd party SW only
 * the bug appears in unsupported configuration 

We believe this bug can be fixed via a local policy module.
For more information please see: 

 * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/sect-security-enhanced_linux-troubleshooting-fixing_problems#sect-Security-Enhanced_Linux-Fixing_Problems-Allowing_Access_audit2allow

If you disagree, please re-open the bug.


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