Bug 1309042

Summary: SELinux is preventing plugin-containe from read, write access on the chr_file /dev/tty2.
Product: [Fedora] Fedora Reporter: fulminemizzega
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a932e11dc5fec430367a9b677a60612c4c34cb89763a6795c66dc5ed573eb231;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-25 08:44:52 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 fulminemizzega 2016-02-16 17:56:00 UTC
Description of problem:
I don't know how it is related, but it popped up as soon as I entered a wrong systemctl command inside a privileged docker container (running systemd inside with f23).
SELinux is preventing plugin-containe from read, write access on the chr_file /dev/tty2.

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

If si vuole usare il pacchetto plugin
Then disabilitare i controlli SELinux sui plugin di Firefox.
Do
# setsebool -P unconfined_mozilla_plugin_transition 0

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

If si crede che plugin-containe dovrebbe avere possibilità di accesso read write sui tty2 chr_file in modo predefinito.
Then si dovrebbe riportare il problema come bug.
E' possibile generare un modulo di politica locale per consentire questo accesso.
Do
consentire questo accesso per il momento eseguendo:
# 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:tty_device_t:s0
Target Objects                /dev/tty2 [ chr_file ]
Source                        plugin-containe
Source Path                   plugin-containe
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.4.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.3.5-300.fc23.x86_64 #1 SMP Mon
                              Feb 1 03:18:41 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-02-16 18:52:22 CET
Last Seen                     2016-02-16 18:52:22 CET
Local ID                      bcf4cbef-384d-4e5e-bd42-3ab7c5a33af6

Raw Audit Messages
type=AVC msg=audit(1455645142.659:705): avc:  denied  { read write } for  pid=8073 comm="plugin-containe" path="/dev/tty2" dev="devtmpfs" ino=1043 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file permissive=0


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

Version-Release number of selected component:
selinux-policy-3.13.1-158.4.fc23.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.3.5-300.fc23.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2016-04-25 08:44:22 UTC
*****  Plugin mozplugger (99.1 confidence) suggests   ************************

If si vuole usare il pacchetto plugin
Then disabilitare i controlli SELinux sui plugin di Firefox.
Do
# setsebool -P unconfined_mozilla_plugin_transition 0