Bug 1024387

Summary: xulrunner plugin-container trying to getattr on ecryptfs dir
Product: [Fedora] Fedora Reporter: Jeff Weiss <jweiss>
Component: xulrunnerAssignee: Gecko Maintainer <gecko-bugs-nobody>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: caillon+fedoraproject, dajohnso, gecko-bugs-nobody, john.j5live, stransky, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-16 14:47:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Weiss 2013-10-29 14:49:49 UTC
Description of problem:
Some plugin is trying to access someone else's home directory.  Firefox is running as jweiss, but it's trying to getattr in /home/.ecryptfs.  I think it's the google talk plugin doing this, but I'm not sure whose job it is to avoid this kind of access.  I could definitely believe this is google's fault, but thought I'd report it here just in case.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Set up your home directory with ecryptfs
2. install google talk plugin
2. Run firefox 
3. load http://plus.google.com or gmail.com

Actual results:


Expected results:


Additional info:
SELinux is preventing /usr/lib64/xulrunner/plugin-container from getattr access on the file /home/.ecryptfs/jweiss/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPO-5VRk7yZ89QHJRGgeH4GU--/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPcu.qfiED.KTJst0Fq02Ep.3Vr7yJ01I5Mdd44yuIlVQ-/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqTfDAe3FoLPJzZhdBl5l4Xp.3MU-.

*****  Plugin restorecon (57.3 confidence) suggests  *************************

If you want to fix the label. 
/home/.ecryptfs/jweiss/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPO-5VRk7yZ89QHJRGgeH4GU--/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPcu.qfiED.KTJst0Fq02Ep.3Vr7yJ01I5Mdd44yuIlVQ-/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqTfDAe3FoLPJzZhdBl5l4Xp.3MU- default label should be ecryptfs_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /home/.ecryptfs/jweiss/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPO-5VRk7yZ89QHJRGgeH4GU--/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPcu.qfiED.KTJst0Fq02Ep.3Vr7yJ01I5Mdd44yuIlVQ-/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqTfDAe3FoLPJzZhdBl5l4Xp.3MU-

*****  Plugin mozplugger (43.1 confidence) suggests  *************************

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

*****  Plugin catchall (1.06 confidence) suggests  ***************************

If you believe that plugin-container should be allowed getattr access on the ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqTfDAe3FoLPJzZhdBl5l4Xp.3MU- 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:home_root_t:s0
Target Objects                /home/.ecryptfs/jweiss/.Private/ECRYPTFS_FNEK_ENCR
                              YPTED.FWbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPO-5VRk7y
                              Z89QHJRGgeH4GU--/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0
                              sVYoUTxzijOD4iFMHkEqhdFkAUPcu.qfiED.KTJst0Fq02Ep.3
                              Vr7yJ01I5Mdd44yuIlVQ-/ECRYPTFS_FNEK_ENCRYPTED.FXbF
                              La1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqT
                              fDAe3FoLPJzZhdBl5l4Xp.3MU- [ file ]
Source                        plugin-containe
Source Path                   /usr/lib64/xulrunner/plugin-container
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           xulrunner-24.0-2.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.9.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 3.11.4-201.fc19.x86_64
                              #1 SMP Thu Oct 10 14:11:18 UTC 2013 x86_64 x86_64
Alert Count                   3360
First Seen                    2013-10-24 09:03:17 EDT
Last Seen                     2013-10-29 10:18:32 EDT
Local ID                      d581d317-d95d-49a4-ac5d-2e088281edaf

Raw Audit Messages
type=AVC msg=audit(1383056312.541:2328): avc:  denied  { getattr } for  pid=5476 comm="plugin-containe" path="/home/.ecryptfs/jweiss/.Private/ECRYPTFS_FNEK_ENCRYPTED.FWbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPO-5VRk7yZ89QHJRGgeH4GU--/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPcu.qfiED.KTJst0Fq02Ep.3Vr7yJ01I5Mdd44yuIlVQ-/ECRYPTFS_FNEK_ENCRYPTED.FXbFLa1W0sVYoUTxzijOD4iFMHkEqhdFkAUPW4-NJDEp13KCjDKdqTfDAe3FoLPJzZhdBl5l4Xp.3MU-" dev="dm-2" ino=821561 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:home_root_t:s0 tclass=file


type=SYSCALL msg=audit(1383056312.541:2328): arch=x86_64 syscall=fstat success=no exit=EACCES a0=16 a1=7fff52d9b330 a2=7fff52d9b330 a3=1 items=0 ppid=2159 pid=5476 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,home_root_t,file,getattr

Comment 1 Martin Stransky 2013-12-16 14:47:27 UTC
Yes, the plugin-container (which runs the plugin) only runs the pluig, it's just the proxy between firefox and plugin itself. So please report at google or disable the access.