Bug 1266840

Summary: SELinux is preventing /usr/lib64/firefox/plugin-container from read, write access on the chr_file nvidiactl.
Product: [Fedora] Fedora Reporter: chanueting <chanueting>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 22CC: chanueting, chinwen_lin, dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:406bdb537629b2468a63741537f82c0ebba5ffd5fb0132045d6970268c1bd319;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 20:55:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description chanueting 2015-09-28 07:28:26 UTC
Description of problem:
SELinux is preventing /usr/lib64/firefox/plugin-container from read, write access on the chr_file nvidiactl.

*****  Plugin mozplugger (87.7 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 device (12.1 confidence) suggests   ****************************

If you want to allow plugin-container to have read write access on the nvidiactl chr_file
Then you need to change the label on nvidiactl to a type of a similar device.
Do
# semanage fcontext -a -t SIMILAR_TYPE 'nvidiactl'
# restorecon -v 'nvidiactl'

*****  Plugin catchall (1.66 confidence) suggests   **************************

If you believe that plugin-container should be allowed read write access on the nvidiactl chr_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                system_u:object_r:device_t:s0
Target Objects                nvidiactl [ chr_file ]
Source                        plugin-containe
Source Path                   /usr/lib64/firefox/plugin-container
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           firefox-41.0-4.fc22.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-128.13.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.1.7-200.fc22.x86_64 #1 SMP Mon
                              Sep 14 20:19:24 UTC 2015 x86_64 x86_64
Alert Count                   33
First Seen                    2015-09-26 09:36:31 HKT
Last Seen                     2015-09-28 14:39:40 HKT
Local ID                      01826567-89b1-4bd7-840a-2c4d7383e208

Raw Audit Messages
type=AVC msg=audit(1443422380.841:615): avc:  denied  { read write } for  pid=11679 comm="plugin-containe" name="nvidiactl" dev="devtmpfs" ino=21071 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=0


type=SYSCALL msg=audit(1443422380.841:615): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff5a101a10 a1=2 a2=7fff5a101a1e a3=0 items=0 ppid=2767 pid=11679 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=1 comm=plugin-containe exe=/usr/lib64/firefox/plugin-container subj=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 key=(null)

Hash: plugin-containe,mozilla_plugin_t,device_t,chr_file,read,write

Version-Release number of selected component:
selinux-policy-3.13.1-128.13.fc22.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.1.7-200.fc22.x86_64
type:           libreport

Potential duplicate: bug 681924

Comment 1 Miroslav Grepl 2015-10-12 12:31:34 UTC
What is a labeling for nvidiactl now on your system?

ls -lZ PATHTO/nvidiactl

We have  a rules which should cover it. I believe we should dontaudit it if a labeling is correct.

Comment 2 chanueting 2015-12-09 14:38:41 UTC
# ls -lZ /dev/nvidiactl
crw-rw-rw-. 1 root root system_u:object_r:device_t:s0 195, 255 Dec  9 21:39 /dev/nvidiactl

Comment 3 Fedora End Of Life 2016-07-19 20:55:05 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.