Bug 1309895 - SELinux is preventing plugin-containe from 'write' accesses on the sock_file native.
Summary: SELinux is preventing plugin-containe from 'write' accesses on the sock_file ...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:140772e4429a1af61fc01290dff...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 22:24 UTC by Joachim Frieben
Modified: 2016-08-18 11:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-18 11:34:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joachim Frieben 2016-02-18 22:24:59 UTC
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.
Do
# 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
Do
# 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.
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: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:
selinux-policy-3.13.1-171.fc24.noarch

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 08:25:00 UTC
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 17:37:15 UTC
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 18:28:58 UTC
(In reply to Daniel Walsh from comment #2)
> Was your homedir in /home?
Yes, correct.

Comment 4 Daniel Walsh 2016-02-20 10:45:46 UTC
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 15:26:39 UTC
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 6 Lukas Vrabec 2016-08-18 11:34:23 UTC
Looks like this is fixed right now.


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