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.

Bug 1056148

Summary: cannot log into GDM seeing just black screen
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Trunecka <mtruneck>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0CC: dwalsh, ebenes, mmalik, mtruneck, vbenes, vbudikov
Target Milestone: rcKeywords: Regression
Target Release: 7.0Flags: vbudikov: needinfo+
vbudikov: needinfo+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.12.1-122.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 10:59:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Enforcing mode
none
Permissive mode none

Description Vladimir Benes 2014-01-21 15:14:22 UTC
Description of problem:
after final update I cannot log into session if selinux in enforcing mode. when moved to permissive I can restart gdm service and log into session

Version-Release number of selected component (if applicable):
gdm-3.8.4-9.el7.x86_64
selinux-policy-3.12.1-118.el7.noarch

How reproducible:
always

Steps to Reproduce:
1.update, reboot
2.log into gnome

Actual results:
just black screen after plymouth, after setenforce=0 I can restart gdm service and log in correctly

Expected results:
no obsatcles.

Additional info:

Comment 3 Miroslav Grepl 2014-01-21 15:32:32 UTC
Vladimir, 
could you try to downgrade systemd? Also are you getting AVC msgs?

Comment 4 Milos Malik 2014-01-21 15:43:07 UTC
Do you see any AVCs or USER_AVCs in enforcing mode?

Comment 5 Vera Budikova 2014-01-21 17:12:43 UTC
Created attachment 853385 [details]
Enforcing mode

Comment 6 Vera Budikova 2014-01-21 17:14:36 UTC
Created attachment 853386 [details]
Permissive mode

Comment 7 Vera Budikova 2014-01-21 17:15:41 UTC
Downgraded systemd:

systemd-207-13.el7 -> systemd-207-12.el7.x86_64

* Version of systemd-207-12.el7.x86_64:
  gdm is working in enforcing mode
  /var/log/audit/audit.log:
type=AVC msg=audit(1390323795.545:349): avc:  denied  { setattr } for  pid=2662 comm="gdm" name="gdm" dev="dm-1" ino=265341 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=dir

* Version of systemd-207-13.el7.x86_64 (see attachments):
enforcing mode:
avc_1_log

permissive mode:
avc_0_log

Comment 8 Milos Malik 2014-01-21 17:53:39 UTC
Could you run following command and then re-test the scenario?
# restorecon -R /var /run

It seems that the gdm directory is mislabeled.

Comment 9 Miroslav Grepl 2014-01-21 19:17:12 UTC
Also how did you get this system?

Comment 11 Vera Budikova 2014-01-22 09:39:01 UTC
I tested this in clean install and after an update.

Comment 12 Miroslav Grepl 2014-01-22 09:46:22 UTC
Ok we have more issues here. systemd issues should be fixed.

Any chance to re-test it with full auditing => we need to see what gdm tries to do. Maybe it is caused by systemd issue. So probably we will need to wait for another snap.

Comment 13 Michal Trunecka 2014-01-27 09:17:23 UTC
I tried the build RHEL-7.0-20140122 with selinux-policy-3.12.1-120.el7 and I could log in in enforcing mode, only that one AVC below appeared. Then I switched to permissive and logged in again, but no more AVCs showed up.


----
type=SYSCALL msg=audit(01/27/2014 04:02:07.989:45) : arch=x86_64 syscall=mkdir success=no exit=-13(Permission denied) a0=0x7fdcca67aa30 a1=0755 a2=0x7fdcca67aa38 a3=0x7fff61576b00 items=0 ppid=1 pid=662 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=gdm exe=/usr/sbin/gdm subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(01/27/2014 04:02:07.989:45) : avc:  denied  { create } for  pid=662 comm=gdm name=gdm scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=dir

Comment 14 Miroslav Grepl 2014-01-27 09:46:28 UTC
Any chance to have all testing with full auditing? Is there /var/gdm?

Comment 15 Michal Trunecka 2014-01-27 10:41:41 UTC
Ok, the AVC doesn't occur during the logging in but just after reboot. Here is the full AVC:

----
type=PATH msg=audit(01/27/2014 05:39:35.271:44) : item=1 name=/var/gdm objtype=CREATE 
type=PATH msg=audit(01/27/2014 05:39:35.271:44) : item=0 name=/var/ inode=133 dev=fd:01 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:var_t:s0 objtype=PARENT 
type=CWD msg=audit(01/27/2014 05:39:35.271:44) :  cwd=/ 
type=SYSCALL msg=audit(01/27/2014 05:39:35.271:44) : arch=x86_64 syscall=mkdir success=no exit=-13(Permission denied) a0=0x7f71b8724a90 a1=0755 a2=0x7f71b8724a98 a3=0x7fff7a251870 items=2 ppid=1 pid=673 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=gdm exe=/usr/sbin/gdm subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(01/27/2014 05:39:35.271:44) : avc:  denied  { create } for  pid=673 comm=gdm name=gdm scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=dir

Comment 16 Michal Trunecka 2014-01-27 10:43:10 UTC
...and here are AVCs in permisive:

----
type=PATH msg=audit(01/27/2014 05:42:15.899:43) : item=1 name=/var/gdm inode=1737097 dev=fd:01 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:var_t:s0 objtype=CREATE 
type=PATH msg=audit(01/27/2014 05:42:15.899:43) : item=0 name=/var/ inode=133 dev=fd:01 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:var_t:s0 objtype=PARENT 
type=CWD msg=audit(01/27/2014 05:42:15.899:43) :  cwd=/ 
type=SYSCALL msg=audit(01/27/2014 05:42:15.899:43) : arch=x86_64 syscall=mkdir success=yes exit=0 a0=0x7ff5ef63ba30 a1=0755 a2=0x7ff5ef63ba38 a3=0x7fff7ecb5ba0 items=2 ppid=1 pid=674 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=gdm exe=/usr/sbin/gdm subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(01/27/2014 05:42:15.899:43) : avc:  denied  { create } for  pid=674 comm=gdm name=gdm scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=dir 
----
type=PATH msg=audit(01/27/2014 05:42:15.906:44) : item=0 name=/var/gdm inode=1737097 dev=fd:01 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:var_t:s0 objtype=NORMAL 
type=CWD msg=audit(01/27/2014 05:42:15.906:44) :  cwd=/ 
type=SYSCALL msg=audit(01/27/2014 05:42:15.906:44) : arch=x86_64 syscall=chmod success=yes exit=0 a0=0x7ff5ee61df49 a1=0711 a2=0x7ff5ed0be768 a3=0x7fff7ecb5ba0 items=1 ppid=1 pid=674 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=gdm exe=/usr/sbin/gdm subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(01/27/2014 05:42:15.906:44) : avc:  denied  { setattr } for  pid=674 comm=gdm name=gdm dev="dm-1" ino=1737097 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_t:s0 tclass=dir

Comment 17 Miroslav Grepl 2014-01-27 10:54:27 UTC
Great. Thanks.

commit 1a0054369860ecd7aaf351d2a104aea0825dc454
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jan 27 11:53:36 2014 +0100

    Allow gdm to create /var/gdm with correct labeling

Comment 20 Ludek Smid 2014-06-13 10:59:34 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.