Bug 907657 - SELinux is preventing /usr/bin/Xorg from unix_read, unix_write access on the shared memory .
Summary: SELinux is preventing /usr/bin/Xorg from unix_read, unix_write access on the ...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f30f835991b1e8b89cfab24acc6...
: 907652 907653 907654 907656 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-04 22:47 UTC by maheffa
Modified: 2013-02-07 23:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-06 08:13:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description maheffa 2013-02-04 22:47:39 UTC
Description of problem:
SELinux is preventing /usr/bin/Xorg from unix_read, unix_write access on the shared memory .

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that Xorg should be allowed unix_read unix_write access on the  shm by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep Xorg /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1
                              023
Target Objects                 [ shm ]
Source                        Xorg
Source Path                   /usr/bin/Xorg
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xorg-x11-server-Xorg-1.13.2-1.fc18.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-73.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.4-204.fc18.i686 #1 SMP Wed Jan
                              23 17:08:59 UTC 2013 i686 i686
Alert Count                   11
First Seen                    2013-02-05 02:39:54 MSK
Last Seen                     2013-02-05 02:44:12 MSK
Local ID                      ffcd0f71-2d28-4f0f-b6c0-d127d0eb5e22

Raw Audit Messages
type=AVC msg=audit(1360017852.869:545): avc:  denied  { unix_read unix_write } for  pid=785 comm="Xorg" key=0  scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=shm


type=SYSCALL msg=audit(1360017852.869:545): arch=i386 syscall=ipc success=no exit=EACCES a0=15 a1=928004 a2=0 a3=bfd3e734 items=0 ppid=770 pid=785 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=Xorg exe=/usr/bin/Xorg subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)

Hash: Xorg,xdm_t,unconfined_t,shm,unix_read,unix_write

audit2allow

#============= xdm_t ==============
#!!!! This avc is allowed in the current policy

allow xdm_t unconfined_t:shm { unix_read unix_write };

audit2allow -R

#============= xdm_t ==============
#!!!! This avc is allowed in the current policy

allow xdm_t unconfined_t:shm { unix_read unix_write };


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.4-204.fc18.i686
type:           libreport

Potential duplicate: bug 804237

Comment 1 Miroslav Grepl 2013-02-05 06:30:38 UTC
This looks like something was going wrong on your login, what login program were you using and does it use pam_selinux?

Comment 2 Miroslav Grepl 2013-02-05 06:32:01 UTC
*** Bug 907654 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2013-02-05 06:32:08 UTC
*** Bug 907656 has been marked as a duplicate of this bug. ***

Comment 4 Miroslav Grepl 2013-02-05 06:32:12 UTC
*** Bug 907653 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Grepl 2013-02-05 06:34:08 UTC
*** Bug 907652 has been marked as a duplicate of this bug. ***

Comment 6 maheffa 2013-02-05 07:52:27 UTC
The default Fedora 18 login program.

Comment 7 Miroslav Grepl 2013-02-05 09:37:14 UTC
Does it happen after every login?

Comment 8 maheffa 2013-02-05 10:54:46 UTC
Yes!

Comment 9 maheffa 2013-02-05 11:15:27 UTC
Oh, sorry, not every login.
I've rebooted manually, and everything is OK. Since I rarely reboot manually (because the system hang very often at random time, gnome-shell suddenly freeze and cannot move my mouse, cannot enter to text mode (ctrl-alt-f2), so I have to power off from ACPI every time), I thought that it always happens every login.
I still don't know what to do with the system hanging up. It's very random, I can't tell when it happens exactly, or why. I cannot report any bug since it's hanging up. I was trying to ask help on some forums, but nobody could help since I can't tell the source of the problem.

Comment 10 Miroslav Grepl 2013-02-06 08:13:29 UTC
It does not look like SELinux issue. You can try to boot with

enforcing=0

as kernel parameter to be sure.

Comment 11 maheffa 2013-02-07 23:17:39 UTC
Sorry for taking too long to answer.

I disabled SELinux (SELINUX=disable, hope it's the same thing as enforcing=0), but the system still hung.

Seems like the problem came from nouveau driver. I heard nouveau has some issues with the 3.7 kernel so I installed nvidia driver, and since then, seems like everything is doing well.

If there is a problem I will report.

Thank you for your contribution. :)


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