Bug 905198 - SELinux is preventing /usr/lib64/xulrunner/plugin-container from 'open' accesses on the file /dev/shm/pulse-shm-2263025957.
Summary: SELinux is preventing /usr/lib64/xulrunner/plugin-container from 'open' acces...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d43791bb6df145e49f8d01af67c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-28 20:27 UTC by Stefan Schulze Frielinghaus
Modified: 2013-02-08 02:25 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-02-08 02:25:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stefan Schulze Frielinghaus 2013-01-28 20:27:32 UTC
Description of problem:
I encounter this problem when watching e.g. a youtube video via Firefox. I can manually relabel the file but since the files get automatically created this is practically not doable for all files.

Is it possible to create a policy rule such that all new files under the directory are created with the right labels?
SELinux is preventing /usr/lib64/xulrunner/plugin-container from 'open' accesses on the file /dev/shm/pulse-shm-2263025957.

*****  Plugin restorecon (99.5 confidence) suggests  *************************

If you want to fix the label. 
/dev/shm/pulse-shm-2263025957 default label should be user_tmpfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /dev/shm/pulse-shm-2263025957

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that plugin-container should be allowed open access on the pulse-shm-2263025957 file 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:object_r:tmpfs_t:s0
Target Objects                /dev/shm/pulse-shm-2263025957 [ file ]
Source                        plugin-containe
Source Path                   /usr/lib64/xulrunner/plugin-container
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           xulrunner-18.0-6.fc18.x86_64
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.x86_64 #1 SMP Wed
                              Jan 23 16:44:29 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-01-28 21:22:51 CET
Last Seen                     2013-01-28 21:22:51 CET
Local ID                      8fca6f4b-6aa9-4f2d-9a50-52b1833fac7f

Raw Audit Messages
type=AVC msg=audit(1359404571.695:918): avc:  denied  { open } for  pid=23982 comm="plugin-containe" path="/dev/shm/pulse-shm-2263025957" dev="tmpfs" ino=299157 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file


type=SYSCALL msg=audit(1359404571.695:918): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff3a03fe30 a1=a0000 a2=0 a3=0 items=0 ppid=23913 pid=23982 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=2 tty=(none) comm=plugin-containe exe=/usr/lib64/xulrunner/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-containe,mozilla_plugin_t,tmpfs_t,file,open

audit2allow

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t tmpfs_t:file open;

audit2allow -R

#============= mozilla_plugin_t ==============
allow mozilla_plugin_t tmpfs_t:file open;


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

Potential duplicate: bug 823039

Comment 1 Daniel Walsh 2013-01-28 20:51:11 UTC
Any idea what process is creating this file?

Comment 2 Stefan Schulze Frielinghaus 2013-01-29 09:11:12 UTC
After experimenting I found out that a wine application creates the file. This means, this is not a mozilla_t problem. Can this be fixed in wine_t or should I create a special policy for my wine app?

Comment 3 Daniel Walsh 2013-01-29 23:53:16 UTC
abd4f726063b2f00072d0e2de92168926c65a952 added to git to allow wine_t to create tmpfs_t files as user_tmpfs_t which will fix this problem.  Thanks for diagnosing this.

Comment 4 Miroslav Grepl 2013-01-30 09:15:04 UTC
Fixed in selinux-policy-3.11.1-74.fc18.noarch

Comment 5 Fedora Update System 2013-01-31 13:19:55 UTC
selinux-policy-3.11.1-74.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-74.fc18

Comment 6 Fedora Update System 2013-02-01 16:41:04 UTC
Package selinux-policy-3.11.1-74.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-74.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-1693/selinux-policy-3.11.1-74.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-02-08 02:25:36 UTC
selinux-policy-3.11.1-74.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.