Bug 713559 - SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from 'use' accesses on the fd /dev/null.
Summary: SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from 'use' acce...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:019d573e441...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-15 19:15 UTC by Nicolas Mailhot
Modified: 2011-11-21 16:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-21 16:56:18 UTC
Type: ---


Attachments (Terms of Use)

Description Nicolas Mailhot 2011-06-15 19:15:26 UTC
SELinux is preventing /usr/lib64/xulrunner-2/plugin-container from 'use' accesses on the fd /dev/null.

*****  Plugin catchall_boolean (80.5 confidence) suggests  *******************

If you want to allow all domains to use other domains file descriptors
Then you must tell SELinux about this by enabling the 'allow_domain_fd_use' boolean.
Do
setsebool -P allow_domain_fd_use 1

*****  Plugin leaks (10.5 confidence) suggests  ******************************

If you want to ignore plugin-container trying to use access the null fd, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /usr/lib64/xulrunner-2/plugin-container /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

*****  Plugin catchall (10.5 confidence) suggests  ***************************

If you believe that plugin-container should be allowed use access on the null fd 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 plugin-containe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c
                              0.c1023
Target Context                unconfined_u:unconfined_r:unconfined_dbusd_t:s0-s0
                              :c0.c1023
Target Objects                /dev/null [ fd ]
Source                        plugin-containe
Source Path                   /usr/lib64/xulrunner-2/plugin-container
Port                          <Inconnu>
Host                          (removed)
Source RPM Packages           xulrunner-2.0.1-2.fc16
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-28.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.0-0.rc3.git0.3.fc16.x86_64 #1
                              SMP Tue Jun 14 17:13:27 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    mer. 15 juin 2011 21:09:09 CEST
Last Seen                     mer. 15 juin 2011 21:09:09 CEST
Local ID                      56cd4259-8011-4555-a812-4515f052e882

Raw Audit Messages
type=AVC msg=audit(1308164949.499:95): avc:  denied  { use } for  pid=2703 comm="plugin-containe" path="/dev/null" dev=devtmpfs ino=5052 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_dbusd_t:s0-s0:c0.c1023 tclass=fd


type=AVC msg=audit(1308164949.499:95): avc:  denied  { use } for  pid=2703 comm="plugin-containe" path="/dev/null" dev=devtmpfs ino=5052 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_dbusd_t:s0-s0:c0.c1023 tclass=fd


type=SYSCALL msg=audit(1308164949.499:95): arch=x86_64 syscall=execve success=yes exit=0 a0=7fcb5800bac8 a1=7fcb5800c210 a2=28f1010 a3=7fcb5f79d6a0 items=0 ppid=2647 pid=2703 auid=500 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=1 comm=plugin-containe exe=/usr/lib64/xulrunner-2/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-containe,mozilla_plugin_t,unconfined_dbusd_t,fd,use

audit2allow

#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using the boolean 'allow_domain_fd_use'

allow mozilla_plugin_t unconfined_dbusd_t:fd use;

audit2allow -R

#============= mozilla_plugin_t ==============
#!!!! This avc can be allowed using the boolean 'allow_domain_fd_use'

allow mozilla_plugin_t unconfined_dbusd_t:fd use;

No idea if it's a policy or firefox bug, looks scarry and should be fixed one way or the other anyway

Comment 1 Dominick Grift 2011-06-15 19:28:38 UTC
did you notice any loss of functionality here? were seeing this "fd use" in places we dont expect them. Some may be ignored (e.g. we might be able to silently deny them)

Comment 2 Daniel Walsh 2011-06-15 19:31:41 UTC
Well we are looking for these in Rawhide now.  We usually have the
allow_domain_fd_use boolean turned on and will turn it back on when we get
closer to beta.  We are trying to undestand where this access is necessary and
understand what it even means.

Did you notice any breakage in the app?

Steve any idea why mozilla_plugin_t would be using a fd owned by
unconfined_dbusd_t which points to /dev/null?

I have a hard time even understanding these AVC's.

Comment 3 Nicolas Mailhot 2011-06-15 19:59:36 UTC
(In reply to comment #2)

> Did you notice any breakage in the app?

Not really, but it happened while I was checking the dovecot avc bugs (which *did* break login in dovecot) and I had already disabled enforcing to get to my mai

Comment 4 Dominick Grift 2011-06-15 20:05:19 UTC
Yes i did add the "fd use" for dovecot_deliver to postfix_master because that one seemed legit to me. But this one is a bit different.

Comment 5 Daniel Walsh 2011-11-21 16:56:18 UTC
Fixed in release.


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