Bug 696912

Summary: SELinux is preventing /usr/lib64/nspluginwrapper/npconfig from 'add_name' accesses on the directory nswrapper_64_64.liblightsparkplugin.so.
Product: [Fedora] Fedora Reporter: Amit Shah <amit.shah>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:55721a6e08f0cf86174f3107acb53634daa21020b7c6f37fcba9e2b0c1ae1806
Fixed In Version: selinux-policy-3.9.7-40.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-25 00:00:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Amit Shah 2011-04-15 08:51:25 UTC
SELinux is preventing /usr/lib64/nspluginwrapper/npconfig from 'add_name' accesses on the directory nswrapper_64_64.liblightsparkplugin.so.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that npconfig should be allowed add_name access on the nswrapper_64_64.liblightsparkplugin.so directory 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 npconfig /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:unconfined_r:sandbox_web_client_t:s0:
                              c197,c496
Target Context                system_u:object_r:nsplugin_rw_t:s0
Target Objects                nswrapper_64_64.liblightsparkplugin.so [ dir ]
Source                        npconfig
Source Path                   /usr/lib64/nspluginwrapper/npconfig
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nspluginwrapper-1.3.0-15.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-37.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.2-10.fc15.x86_64
                              #1 SMP Thu Mar 31 03:11:25 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Tue 12 Apr 2011 02:27:39 PM IST
Last Seen                     Tue 12 Apr 2011 02:27:39 PM IST
Local ID                      296d2c51-74ee-4078-abeb-811b180b6894

Raw Audit Messages
type=AVC msg=audit(1302598659.589:27072): avc:  denied  { add_name } for  pid=10296 comm="npconfig" name="nswrapper_64_64.liblightsparkplugin.so" scontext=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c197,c496 tcontext=system_u:object_r:nsplugin_rw_t:s0 tclass=dir


type=AVC msg=audit(1302598659.589:27072): avc:  denied  { create } for  pid=10296 comm="npconfig" name="nswrapper_64_64.liblightsparkplugin.so" scontext=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c197,c496 tcontext=unconfined_u:object_r:nsplugin_rw_t:s0:c197,c496 tclass=file


type=AVC msg=audit(1302598659.589:27072): avc:  denied  { write } for  pid=10296 comm="npconfig" name="nswrapper_64_64.liblightsparkplugin.so" dev=dm-3 ino=4325893 scontext=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c197,c496 tcontext=unconfined_u:object_r:nsplugin_rw_t:s0:c197,c496 tclass=file


type=SYSCALL msg=audit(1302598659.589:27072): arch=x86_64 syscall=open success=yes exit=ESRCH a0=7fff95c12e40 a1=41 a2=1ed a3=0 items=0 ppid=10283 pid=10296 auid=500 uid=500 gid=501 euid=0 suid=0 fsuid=0 egid=501 sgid=501 fsgid=501 tty=(none) ses=1 comm=npconfig exe=/usr/lib64/nspluginwrapper/npconfig subj=unconfined_u:unconfined_r:sandbox_web_client_t:s0:c197,c496 key=(null)

Hash: npconfig,sandbox_web_client_t,nsplugin_rw_t,dir,add_name

audit2allow

#============= sandbox_web_client_t ==============
allow sandbox_web_client_t nsplugin_rw_t:dir add_name;
allow sandbox_web_client_t nsplugin_rw_t:file { write create };

audit2allow -R

#============= sandbox_web_client_t ==============
allow sandbox_web_client_t nsplugin_rw_t:dir add_name;
allow sandbox_web_client_t nsplugin_rw_t:file { write create };

Comment 1 Miroslav Grepl 2011-04-15 11:52:49 UTC
AFAIK we had 

nsplugin_manage_rw(sandbox_web_type)

in F13 policy.

Comment 2 Daniel Walsh 2011-04-15 12:35:32 UTC
I guess that is ok.  My concern is this is a way for sandboxes to attack each other, but I think this is controlled.  And we want sandbox_web to work.

Comment 3 Miroslav Grepl 2011-04-18 08:25:24 UTC
Fixed in selinux-policy-3.9.7-40.fc14

Comment 4 Fedora Update System 2011-04-21 14:50:45 UTC
selinux-policy-3.9.7-40.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-40.fc14

Comment 5 Fedora Update System 2011-04-21 22:26:21 UTC
Package selinux-policy-3.9.7-40.fc14:
* should fix your issue,
* was pushed to the Fedora 14 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.9.7-40.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-40.fc14
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-04-24 23:59:29 UTC
selinux-policy-3.9.7-40.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.