Bug 994888

Summary: SELinux is preventing /usr/bin/totem from 'write' accesses on the sock_file pkcs11.
Product: [Fedora] Fedora Reporter: NickG <exosyst>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:9b6a1092c24745a4432170b714379f45fb85226c52267955ec6972917f476b9d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-19 10:35:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description NickG 2013-08-08 08:21:17 UTC
Description of problem:
Started viewing http://mtvnmobile.vo.llnwd.net/kip0/_pxn=0+_pxK=18639/44620/mtvnorigin/gsp.comedystor/com/colbert/season_09/episode_135/cr_09135_02_1280x720_3500_h32.mp4 in Firefox.

Right clicked the video as it was playing and chose to View in Totem.

Totem loads and requests to start playback and selinux steps in with it's standard "You want to use your laptop for 'NORMAL USAGE'?, No no no - you can't do that."

SELinux is preventing /usr/bin/totem from 'write' accesses on the sock_file pkcs11.

*****  Plugin mozplugger (99.1 confidence) suggests  *************************

If you want to use the plugin package
Then you must turn off SELinux controls on the Firefox plugins.
# setsebool unconfined_mozilla_plugin_transition 0

*****  Plugin catchall (1.81 confidence) suggests  ***************************

If you believe that totem should be allowed write access on the pkcs11 sock_file 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 totem /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
Target Context                unconfined_u:object_r:gkeyringd_tmp_t:s0
Target Objects                pkcs11 [ sock_file ]
Source                        totem
Source Path                   /usr/bin/totem
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           totem-3.8.2-1.fc19.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-69.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.9.9-301.fc19.i686 #1 SMP Thu Jul
                              4 15:35:21 UTC 2013 i686 i686
Alert Count                   1
First Seen                    2013-08-08 09:17:23 BST
Last Seen                     2013-08-08 09:17:23 BST
Local ID                      67cf39ec-25a6-4e32-9ee9-72629bf0fc4f

Raw Audit Messages
type=AVC msg=audit(1375949843.598:3171): avc:  denied  { write } for  pid=24158 comm="totem" name="pkcs11" dev="tmpfs" ino=20101 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:gkeyringd_tmp_t:s0 tclass=sock_file

type=SYSCALL msg=audit(1375949843.598:3171): arch=i386 syscall=socketcall success=yes exit=0 a0=3 a1=bfbefb00 a2=ae0ec000 a3=0 items=0 ppid=1 pid=24158 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 ses=1 tty=(none) comm=totem exe=/usr/bin/totem subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: totem,mozilla_plugin_t,gkeyringd_tmp_t,sock_file,write

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.9.9-301.fc19.i686
type:           libreport

Comment 1 Daniel Walsh 2013-08-09 12:30:23 UTC
Most likely need to turn off the protection.

# setsebool unconfined_mozilla_plugin_transition 0

Comment 2 NickG 2013-08-09 12:40:21 UTC
Agreed with the fix. But if shipping selinux is the way forward, the default policies really need to get out of the way.

Comment 3 Daniel Walsh 2013-08-09 13:00:09 UTC
Well then we would protect nobody from bad plugins.  Since no one would no to turn it on.