Bug 541946 - SELinux is preventing /bin/dbus-daemon access to a leaked unix_dgram_socket file descriptor.
Summary: SELinux is preventing /bin/dbus-daemon access to a leaked unix_dgram_socket f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:c37c6a6c781...
: 527478 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-27 16:40 UTC by Michael Young
Modified: 2010-02-11 14:40 UTC (History)
4 users (show)

Fixed In Version: 3.6.32-84.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-11 14:40:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Young 2009-11-27 16:40:34 UTC
Summary:

SELinux is preventing /bin/dbus-daemon access to a leaked unix_dgram_socket file
descriptor.

Detailed Description:

[dbus-daemon has a permissive type (system_dbusd_t). This access was not
denied.]

SELinux denied access requested by the dbus-daemon command. It looks like this
is either a leaked descriptor or dbus-daemon output was redirected to a file it
is not allowed to access. Leaks usually can be ignored since SELinux is just
closing the leak and reporting the error. The application does not use the
descriptor, so it will run properly. If this is a redirection, you will not get
output in the unix_dgram_socket. You should generate a bugzilla on
selinux-policy, and it will get routed to the appropriate package. You can
safely ignore this avc.

Allowing Access:

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

Additional Information:

Source Context                unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c102
                              3
Target Context                unconfined_u:system_r:initrc_t:s0
Target Objects                unix_dgram_socket [ unix_dgram_socket ]
Source                        dbus-daemon
Source Path                   /bin/dbus-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dbus-1.2.16-8.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-46.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed) 2.6.31.5-127.fc12.i686.PAE #1 SMP
                              Sat Nov 7 21:25:57 EST 2009 i686 i686
Alert Count                   4
First Seen                    Fri 27 Nov 2009 16:25:27 GMT
Last Seen                     Fri 27 Nov 2009 16:25:27 GMT
Local ID                      e2aaa6d6-836e-4d8a-9aac-6327c59f6b1f
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1259339127.270:25945): avc:  denied  { read write } for  pid=4420 comm="dbus-daemon" path="socket:[71448]" dev=sockfs ino=71448 scontext=unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=unix_dgram_socket

node=(removed) type=AVC msg=audit(1259339127.270:25945): avc:  denied  { read write } for  pid=4420 comm="dbus-daemon" path="socket:[71450]" dev=sockfs ino=71450 scontext=unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=unix_dgram_socket

node=(removed) type=AVC msg=audit(1259339127.270:25945): avc:  denied  { read write } for  pid=4420 comm="dbus-daemon" path="socket:[71452]" dev=sockfs ino=71452 scontext=unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=tcp_socket

node=(removed) type=AVC msg=audit(1259339127.270:25945): avc:  denied  { read write } for  pid=4420 comm="dbus-daemon" path="socket:[71488]" dev=sockfs ino=71488 scontext=unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:initrc_t:s0 tclass=tcp_socket

node=(removed) type=SYSCALL msg=audit(1259339127.270:25945): arch=40000003 syscall=11 success=yes exit=0 a0=804c710 a1=bfd8f46c a2=bfd90834 a3=7 items=0 ppid=4419 pid=4420 auid=2742 uid=583 gid=583 euid=583 suid=583 fsuid=583 egid=583 sgid=583 fsgid=583 tty=pts1 ses=2 comm="dbus-daemon" exe="/bin/dbus-daemon" subj=unconfined_u:system_r:system_dbusd_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-46.fc12,leaks,dbus-daemon,system_dbusd_t,initrc_t,unix_dgram_socket,read,write
audit2allow suggests:

#============= system_dbusd_t ==============
allow system_dbusd_t initrc_t:tcp_socket { read write };
allow system_dbusd_t initrc_t:unix_dgram_socket { read write };

Comment 1 Michael Young 2009-11-27 16:46:01 UTC
The above error seems to correspond to connecting to xrdp using rdesktop from a different machine (the connection fails). A subsequent connection works.

Comment 2 Daniel Walsh 2009-12-01 15:55:11 UTC
Miroslav can you look into a policy for xrdp?

I guess this is similar to vncserver?

Comment 3 Carl G. 2010-01-17 03:09:27 UTC
Closed for now, if you can, feel free to provide the req. info.

Comment 4 Michael Young 2010-01-17 12:42:05 UTC
I don't think the question in comment 2 was addressed to me, but yes xrdp will be similar to vncserver or Xvnc in the way it functions.

Comment 5 Miroslav Grepl 2010-01-18 08:55:50 UTC
Yes, this is a question for me. I'll take care of this bug.

Comment 6 Miroslav Grepl 2010-01-20 21:32:07 UTC
Michael,

could you try these following changes. Execute:

# chcon -t unconfined_exec_t /usr/sbin/xrdp-sesman
# chcon -t unconfined_exec_t /usr/sbin/xrdp


Also please install the latest selinux-policy. (selinux-policy-3.6.32-73.fc12.noarch)

# yum update selinux-policy-targeted --enablerepo=updates-testing

Comment 7 Michael Young 2010-01-21 17:00:01 UTC
Yes, those changes seem to allow xrdp to work (at the second attempt but I think that is an xrdp bug) without selinux error reports.

Also I found Bug 527478 which seems to be similar to this one.

Comment 8 Daniel Walsh 2010-01-21 18:04:44 UTC
*** Bug 527478 has been marked as a duplicate of this bug. ***

Comment 9 Miroslav Grepl 2010-02-01 13:03:03 UTC
Dan,

I believe we should add this labeling to policy. (I was also testing it and looks good).

/usr/sbin/xrdp   --  gen_context(system_u:object_r:unconfined_exec_t,s0)
/usr/sbin/xrdp-sesman   --  gen_context(system_u:object_r:unconfined_exec_t,s0)

Comment 10 Daniel Walsh 2010-02-01 20:54:49 UTC
Ok

Comment 11 Miroslav Grepl 2010-02-02 09:47:48 UTC
Fixed in selinux-policy-3.6.32-81.fc12

Comment 12 Fedora Update System 2010-02-03 23:18:09 UTC
selinux-policy-3.6.32-82.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-82.fc12

Comment 13 Fedora Update System 2010-02-05 01:42:36 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1492

Comment 14 Fedora Update System 2010-02-11 14:35:16 UTC
selinux-policy-3.6.32-84.fc12 has been pushed to the Fedora 12 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.