Bug 1309895 - SELinux is preventing plugin-containe from 'write' accesses on the sock_file native.
SELinux is preventing plugin-containe from 'write' accesses on the sock_file ...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
high Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-18 17:24 EST by Joachim Frieben
Modified: 2016-08-18 07:34 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-18 07:34:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joachim Frieben 2016-02-18 17:24:59 EST
Description of problem:
SELinux is preventing plugin-containe from 'write' accesses on the sock_file native.

*****  Plugin mozplugger (93.0 confidence) suggests   ************************

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

*****  Plugin catchall_labels (6.67 confidence) suggests   *******************

If you want to allow plugin-containe to have write access on the native sock_file
Then you need to change the label on native
# semanage fcontext -a -t FILE_TYPE 'native'
where FILE_TYPE is one of the following: abrt_var_run_t, alsa_home_t, antivirus_home_t, audio_home_t, auth_home_t, avahi_var_run_t, bluetooth_tmp_t, bluetooth_var_run_t, bumblebee_var_run_t, cache_home_t, chrome_sandbox_home_t, config_home_t, cupsd_var_run_t, cvs_home_t, data_home_t, dbus_home_t, devlog_t, fetchmail_home_t, gconf_home_t, git_user_content_t, gkeyringd_gnome_home_t, gnome_home_t, gpg_secret_t, gstreamer_home_t, home_bin_t, home_cert_t, httpd_user_content_t, httpd_user_htaccess_t, httpd_user_ra_content_t, httpd_user_rw_content_t, httpd_user_script_exec_t, icc_data_home_t, iceauth_home_t, irc_home_t, irc_tmp_t, irssi_home_t, kismet_home_t, krb5_home_t, local_login_home_t, lsassd_var_socket_t, mail_home_rw_t, mail_home_t, mandb_home_t, mozilla_home_t, mozilla_plugin_tmp_t, mozilla_plugin_tmpfs_t, mpd_home_t, mpd_user_data_t, mplayer_home_t, mysqld_home_t, nmbd_var_run_t, nscd_var_run_t, nslcd_var_run_t, openshift_var_lib_t, pcscd_var_run_t, polipo_cache_home_t, polipo_config_home_t, procmail_home_t, pulseaudio_home_t, pulseaudio_var_run_t, rlogind_home_t, rssh_ro_t, rssh_rw_t, sandbox_file_t, screen_home_t, setrans_var_run_t, spamc_home_t, speech-dispatcher_home_t, ssh_home_t, sssd_var_lib_t, svirt_home_t, syslogd_var_run_t, system_dbusd_var_run_t, systemd_home_t, telepathy_cache_home_t, telepathy_data_home_t, telepathy_gabble_cache_home_t, telepathy_logger_cache_home_t, telepathy_logger_data_home_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_data_home_t, telepathy_mission_control_home_t, telepathy_sunshine_home_t, texlive_home_t, thumb_home_t, tvtime_home_t, uml_ro_t, uml_rw_t, user_fonts_cache_t, user_fonts_config_t, user_fonts_t, user_home_t, user_tmp_t, virt_content_t, virt_home_t, vmware_conf_t, vmware_file_t, winbind_var_run_t, wine_home_t, wireshark_home_t, xauth_home_t, xdm_home_t. 
Then execute: 
restorecon -v 'native'

*****  Plugin catchall (1.73 confidence) suggests   **************************

If you believe that plugin-containe should be allowed write access on the native 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 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
Target Context                unconfined_u:object_r:default_t:s0
Target Objects                native [ sock_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-171.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc4.git1.2.fc24.x86_64 #1
                              SMP Wed Feb 17 16:11:54 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-02-18 22:13:48 CET
Last Seen                     2016-02-18 22:47:16 CET
Local ID                      993ac6f2-c280-4d57-9383-a2e52b5b0e3e

Raw Audit Messages
type=AVC msg=audit(1455832036.883:362): avc:  denied  { write } for  pid=2016 comm="plugin-containe" name="native" dev="tmpfs" ino=25858 scontext=unconfined_u:unconfined_r:mozilla_plugin_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:default_t:s0 tclass=sock_file permissive=1

Hash: plugin-containe,mozilla_plugin_t,default_t,sock_file,write

Version-Release number of selected component:

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc4.git1.2.fc24.x86_64
type:           libreport
Comment 1 Joachim Frieben 2016-02-19 03:25:00 EST
Issue is absent after fully relabeling the file system. However, after a fresh network install from the Fedora development tree in a virtual machine like in this case, this should not be necessary - an anaconda issue? Maybe a full relabeling should be triggered by anaconda after install.
Comment 2 Daniel Walsh 2016-02-19 12:37:15 EST
Was your homedir in /home?

This looks like for some reason your homedir was not labeled correctly during the install.
Comment 3 Joachim Frieben 2016-02-19 13:28:58 EST
(In reply to Daniel Walsh from comment #2)
> Was your homedir in /home?
Yes, correct.
Comment 4 Daniel Walsh 2016-02-20 05:45:46 EST
Then this seems to be a problem in anaconda or the latest selinux-policy package not labeling /home correctly.
Comment 5 Jan Kurik 2016-02-24 10:26:39 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
Comment 6 Lukas Vrabec 2016-08-18 07:34:23 EDT
Looks like this is fixed right now.

Note You need to log in before you can comment on or make changes to this bug.