Bug 973799 - SELinux is preventing /usr/bin/python2.7 from 'connectto' accesses on the unix_stream_socket @/tmp/dbus-mq8ZeGKq8A.
SELinux is preventing /usr/bin/python2.7 from 'connectto' accesses on the uni...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-06-12 15:02 EDT by Garrett Holmstrom
Modified: 2013-07-24 20:40 EDT (History)
5 users (show)

See Also:
Fixed In Version: selinux-policy-3.11.1-98.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-24 20:40:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Garrett Holmstrom 2013-06-12 15:02:41 EDT
Description of problem:
I encountered this when starting Firefox shortly after logging into XFCE.

If it matters, note this account's staff_t context.
SELinux is preventing /usr/bin/python2.7 from 'connectto' accesses on the unix_stream_socket @/tmp/dbus-mq8ZeGKq8A.

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

If you believe that python2.7 should be allowed connectto access on the dbus-mq8ZeGKq8A unix_stream_socket by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                staff_u:staff_r:staff_t:s0-s0:c0.c1023
Target Context                system_u:system_r:xdm_dbusd_t:s0-s0:c0.c1023
Target Objects                @/tmp/dbus-mq8ZeGKq8A [ unix_stream_socket ]
Source                        python
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           gnome-terminal-3.6.1-2.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.4-200.fc18.x86_64 #1 SMP Fri
                              May 24 20:10:49 UTC 2013 x86_64 x86_64
Alert Count                   38
First Seen                    2013-05-16 11:52:53 PDT
Last Seen                     2013-06-12 11:55:41 PDT
Local ID                      1a0c4809-1610-48e4-8899-c1fadc156606

Raw Audit Messages
type=AVC msg=audit(1371063341.974:923): avc:  denied  { connectto } for  pid=18626 comm="gnome-terminal" path=002F746D702F646275732D6D71385A65474B713841 scontext=staff_u:staff_r:staff_t:s0-s0:c0.c1023 tcontext=system_u:system_r:xdm_dbusd_t:s0-s0:c0.c1023 tclass=unix_stream_socket

type=SYSCALL msg=audit(1371063341.974:923): arch=x86_64 syscall=connect success=no exit=EACCES a0=3 a1=7fffd7e1cfa0 a2=17 a3=0 items=0 ppid=18358 pid=18626 auid=1000 uid=1000 gid=100 euid=1000 suid=1000 fsuid=1000 egid=100 sgid=100 fsgid=100 ses=6 tty=(none) comm=gnome-terminal exe=/usr/bin/gnome-terminal subj=staff_u:staff_r:staff_t:s0-s0:c0.c1023 key=(null)

Hash: python,staff_t,xdm_dbusd_t,unix_stream_socket,connectto


#============= staff_t ==============
allow staff_t xdm_dbusd_t:unix_stream_socket connectto;

audit2allow -R
require {
	type staff_t;
	type xdm_dbusd_t;
	class unix_stream_socket connectto;

#============= staff_t ==============
allow staff_t xdm_dbusd_t:unix_stream_socket connectto;

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.4-200.fc18.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-06-13 08:55:02 EDT
Did you setup staff_u and re-login and then you used Firefox?
Comment 2 Garrett Holmstrom 2013-06-13 22:58:43 EDT
Not exactly.  I set this user up as staff_u when I installed F18 shortly after its release.  I've been using it that way ever since, with numerous updates and reboots.
Comment 3 Miroslav Grepl 2013-06-14 01:47:33 EDT
And are you able to get it again?
Comment 4 Daniel Walsh 2013-06-18 12:16:36 EDT
Ray are normal users supposed to be able to communicate with gdm over dbus?
Comment 5 Ray Strode [halfline] 2013-06-19 10:43:37 EDT
the GNOME unlock dialog does. I don't know why gnome-terminal, XFCE, or python would be.
Comment 6 Daniel Walsh 2013-06-19 15:51:13 EDT
37a5f9682d0a02ac3537876ffad88a3f9bfba3cc allows this since we were allowing staff_t to connecto xdm_t, not sure why this is running as xdm_dbusd_t.
Comment 7 Fedora Update System 2013-06-27 09:36:02 EDT
selinux-policy-3.11.1-98.fc18 has been submitted as an update for Fedora 18.
Comment 8 Fedora Update System 2013-06-28 02:10:03 EDT
Package selinux-policy-3.11.1-98.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.11.1-98.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2013-07-24 20:40:02 EDT
selinux-policy-3.11.1-98.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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