Bug 543970 (rootlogin)

Summary: SELinux is preventing /usr/libexec/gdm-session-worker "write" access on /root.
Product: [Fedora] Fedora Reporter: vmsysprog
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: adamus1117, adrian1h, alfonsomoras, bhernco, bill, bkahn, chavesdocarmo, cjm, darkkitten, dazeminu, dilamar.martinez, don-redhat-z6y, dwalsh, etusha, istanbulcu, jerianjer, john_antony40, kassabon14, kingbiotech, lee, matthewdahouse, mgrepl, M.M.Nour.aoi, neoh.ys, papseddy, rosegun38, sherifkhan, simon.lewis, tan_shiruban, vulpe
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:9b2e46a20f09ea3c3282023fceab3a5b200bfc886ffb099b599bf0130c7176d5
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 16:01:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 677991, 712686    

Description vmsysprog 2009-12-03 15:53:19 UTC
Summary:

SELinux is preventing /usr/libexec/gdm-session-worker "write" access on /root.

Detailed Description:

SELinux denied access requested by gdm-session-wor. It is not expected that this
access is required by gdm-session-wor and this access may signal an intrusion
attempt. It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root [ dir ]
Source                        gdm-session-wor
Source Path                   /usr/libexec/gdm-session-worker
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gdm-2.28.1-24.fc12
Target RPM Packages           filesystem-2.4.30-2.fc12
Policy RPM                    selinux-policy-3.6.32-49.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.6-145.fc12.i686 #1 SMP Sat
                              Nov 21 16:28:23 EST 2009 i686 i686
Alert Count                   2
First Seen                    Thu 03 Dec 2009 10:51:04 AM EST
Last Seen                     Thu 03 Dec 2009 10:51:04 AM EST
Local ID                      cdf26dd4-5864-499c-8981-c57de945160d
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1259855464.673:39): avc:  denied  { write } for  pid=5640 comm="gdm-session-wor" name="root" dev=sda3 ino=16397 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1259855464.673:39): arch=40000003 syscall=5 success=no exit=-13 a0=8c18380 a1=80c2 a2=180 a3=1e items=0 ppid=5597 pid=5640 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4 comm="gdm-session-wor" exe="/usr/libexec/gdm-session-worker" subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-49.fc12,catchall,gdm-session-wor,xdm_t,admin_home_t,dir,write
audit2allow suggests:

#============= xdm_t ==============
allow xdm_t admin_home_t:dir write;

Comment 1 Daniel Walsh 2009-12-03 16:01:19 UTC
Logging in directly as root from X Windows is not supported with SELinux,  It is considered too dangerous and the amount/type of policy that would needed to be written, would allow too much access.


Either put the machin in permissive mode when you login as root, or login as a normal user and use su or sudo to reach root.

Comment 2 Daniel Walsh 2009-12-03 16:01:46 UTC
*** Bug 543972 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2009-12-04 11:52:36 UTC
*** Bug 541639 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2009-12-05 11:09:55 UTC
*** Bug 544475 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Walsh 2009-12-09 13:35:01 UTC
*** Bug 545412 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Walsh 2009-12-16 13:55:06 UTC
*** Bug 547931 has been marked as a duplicate of this bug. ***

Comment 7 Daniel Walsh 2009-12-16 13:57:26 UTC
*** Bug 547933 has been marked as a duplicate of this bug. ***

Comment 8 Daniel Walsh 2009-12-21 15:31:16 UTC
*** Bug 548997 has been marked as a duplicate of this bug. ***

Comment 9 Daniel Walsh 2009-12-23 14:24:33 UTC
*** Bug 533636 has been marked as a duplicate of this bug. ***

Comment 10 Daniel Walsh 2009-12-23 17:16:29 UTC
*** Bug 541153 has been marked as a duplicate of this bug. ***

Comment 11 Daniel Walsh 2009-12-27 12:50:45 UTC
*** Bug 550210 has been marked as a duplicate of this bug. ***

Comment 12 Daniel Walsh 2009-12-27 13:02:46 UTC
*** Bug 550364 has been marked as a duplicate of this bug. ***

Comment 13 Miroslav Grepl 2009-12-28 11:01:09 UTC
*** Bug 550659 has been marked as a duplicate of this bug. ***

Comment 14 Miroslav Grepl 2009-12-28 11:05:26 UTC
*** Bug 550661 has been marked as a duplicate of this bug. ***

Comment 15 Daniel Walsh 2009-12-31 13:46:45 UTC
*** Bug 551460 has been marked as a duplicate of this bug. ***

Comment 16 Daniel Walsh 2009-12-31 13:51:29 UTC
*** Bug 551485 has been marked as a duplicate of this bug. ***

Comment 17 Daniel Walsh 2009-12-31 14:00:43 UTC
*** Bug 551504 has been marked as a duplicate of this bug. ***

Comment 18 Miroslav Grepl 2010-01-04 09:15:39 UTC
*** Bug 551905 has been marked as a duplicate of this bug. ***

Comment 19 Miroslav Grepl 2010-01-04 10:58:46 UTC
*** Bug 551654 has been marked as a duplicate of this bug. ***

Comment 20 Miroslav Grepl 2010-01-04 10:59:33 UTC
*** Bug 551653 has been marked as a duplicate of this bug. ***

Comment 21 Miroslav Grepl 2010-01-04 11:00:26 UTC
*** Bug 551652 has been marked as a duplicate of this bug. ***

Comment 22 Daniel Walsh 2010-01-04 15:35:18 UTC
*** Bug 551903 has been marked as a duplicate of this bug. ***

Comment 23 Daniel Walsh 2010-01-12 15:59:42 UTC
*** Bug 543062 has been marked as a duplicate of this bug. ***

Comment 24 Daniel Walsh 2010-01-21 19:46:32 UTC
*** Bug 557549 has been marked as a duplicate of this bug. ***

Comment 25 Daniel Walsh 2010-01-21 19:46:53 UTC
*** Bug 557550 has been marked as a duplicate of this bug. ***

Comment 26 Miroslav Grepl 2010-01-25 09:48:28 UTC
*** Bug 557945 has been marked as a duplicate of this bug. ***

Comment 27 Daniel Walsh 2010-01-27 18:41:53 UTC
*** Bug 559328 has been marked as a duplicate of this bug. ***

Comment 28 Miroslav Grepl 2010-01-28 16:40:39 UTC
*** Bug 559619 has been marked as a duplicate of this bug. ***

Comment 29 Miroslav Grepl 2010-01-28 16:42:28 UTC
*** Bug 559617 has been marked as a duplicate of this bug. ***

Comment 30 Miroslav Grepl 2010-02-01 11:13:55 UTC
*** Bug 560280 has been marked as a duplicate of this bug. ***

Comment 31 Miroslav Grepl 2010-02-01 11:19:41 UTC
*** Bug 560363 has been marked as a duplicate of this bug. ***

Comment 32 Daniel Walsh 2010-02-02 13:39:23 UTC
*** Bug 560836 has been marked as a duplicate of this bug. ***

Comment 33 Daniel Walsh 2010-02-02 13:39:47 UTC
*** Bug 560837 has been marked as a duplicate of this bug. ***

Comment 34 Daniel Walsh 2010-02-03 20:48:09 UTC
*** Bug 561533 has been marked as a duplicate of this bug. ***

Comment 35 Daniel Walsh 2010-02-05 16:01:19 UTC
*** Bug 562161 has been marked as a duplicate of this bug. ***

Comment 36 Daniel Walsh 2010-02-09 13:46:10 UTC
*** Bug 563088 has been marked as a duplicate of this bug. ***

Comment 37 Daniel Walsh 2010-02-14 14:21:52 UTC
*** Bug 565282 has been marked as a duplicate of this bug. ***

Comment 38 Miroslav Grepl 2010-02-15 22:42:33 UTC
*** Bug 565644 has been marked as a duplicate of this bug. ***

Comment 39 Daniel Walsh 2010-02-24 16:44:12 UTC
*** Bug 567990 has been marked as a duplicate of this bug. ***

Comment 40 Daniel Walsh 2010-03-05 18:52:56 UTC
*** Bug 570873 has been marked as a duplicate of this bug. ***

Comment 41 Daniel Walsh 2010-03-17 12:51:51 UTC
*** Bug 568323 has been marked as a duplicate of this bug. ***

Comment 42 Daniel Walsh 2010-03-18 14:03:32 UTC
*** Bug 574653 has been marked as a duplicate of this bug. ***

Comment 43 Miroslav Grepl 2010-03-29 08:35:16 UTC
*** Bug 577661 has been marked as a duplicate of this bug. ***

Comment 44 Miroslav Grepl 2010-04-26 08:53:46 UTC
*** Bug 585524 has been marked as a duplicate of this bug. ***

Comment 45 Daniel Walsh 2010-04-29 18:19:26 UTC
*** Bug 587358 has been marked as a duplicate of this bug. ***

Comment 46 Daniel Walsh 2010-05-17 13:23:14 UTC
*** Bug 592629 has been marked as a duplicate of this bug. ***

Comment 47 Miroslav Grepl 2010-05-25 14:30:45 UTC
*** Bug 595530 has been marked as a duplicate of this bug. ***

Comment 48 Daniel Walsh 2010-06-02 18:05:30 UTC
*** Bug 599121 has been marked as a duplicate of this bug. ***

Comment 49 Daniel Walsh 2010-06-02 18:05:54 UTC
*** Bug 599125 has been marked as a duplicate of this bug. ***

Comment 50 Miroslav Grepl 2010-09-08 07:41:01 UTC
*** Bug 630492 has been marked as a duplicate of this bug. ***

Comment 51 The Old Man 2011-09-14 13:59:38 UTC
(In reply to comment #1)
> Logging in directly as root from X Windows is not supported with SELinux,  It
> is considered too dangerous and the amount/type of policy that would needed to
> be written, would allow too much access.
> 
> 
> Either put the machin in permissive mode when you login as root, or login as a
> normal user and use su or sudo to reach root.

So tell me again why should not be allowed to trash my own machine....

Comment 52 Daniel Walsh 2011-09-15 13:49:34 UTC
You can go right a head.  I would tell you to disable SELinux or put it in permissive mode and go to town.  But a security mechanism is not going to allow what looks like apps attacking the /root directory and other capabilities that come along with logging in as root.