Bug 1003212

Summary: SELinux is preventing /usr/bin/ibus-daemon from 'read' accesses on the file /var/cache/ibus/bus/registry.
Product: [Fedora] Fedora Reporter: Yosuke Kobayashi <uq.yosuke.kobayashi>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: b51008, dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:703c19bddcf1002d8e3bf5de02f031aee3e5952d3c7707175dcec5f7905a5810
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-22 12:20:12 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 Yosuke Kobayashi 2013-08-31 21:54:33 UTC
Description of problem:
SELinux is preventing /usr/bin/ibus-daemon from 'read' accesses on the file /var/cache/ibus/bus/registry.

*****  Plugin catchall_labels (83.8 confidence) suggests  ********************

If you want to allow ibus-daemon to have read access on the registry file
Then /var/cache/ibus/bus/registry のラベルを変更する必要があります
Do
# semanage fcontext -a -t FILE_TYPE '/var/cache/ibus/bus/registry'
この FILE_TYPE 以下のどれかです: NetworkManager_tmp_t, NetworkManager_var_lib_t, abrt_dump_oops_exec_t, abrt_handle_event_exec_t, abrt_helper_exec_t, abrt_retrace_coredump_exec_t, abrt_retrace_worker_exec_t, abrt_tmp_t, abrt_var_cache_t, abrt_var_run_t, acct_exec_t, admin_crontab_tmp_t, admin_passwd_exec_t, afs_cache_t, aide_exec_t, alsa_etc_rw_t, alsa_exec_t, alsa_home_t, alsa_tmp_t, amanda_recover_exec_t, amanda_tmp_t, amtu_exec_t, anacron_exec_t, anon_inodefs_t, antivirus_tmp_t, apcupsd_tmp_t, apm_exec_t, apmd_tmp_t, arpwatch_tmp_t, asterisk_tmp_t, audio_home_t, audisp_exec_t, auditadm_sudo_tmp_t, auditctl_exec_t, auth_cache_t, auth_home_t, authconfig_exec_t, autofs_t, automount_tmp_t, awstats_tmp_t, bin_t, bitlbee_tmp_t, bluetooth_helper_exec_t, bluetooth_helper_tmp_t, bluetooth_tmp_t, boinc_project_tmp_t, boinc_tmp_t, boot_t, bootloader_exec_t, bootloader_tmp_t, brctl_exec_t, cache_home_t, calamaris_exec_t, cardctl_exec_t, cardmgr_dev_t, ccs_tmp_t, cdcc_exec_t, cdcc_tmp_t, cdrecord_exec_t, cert_t, certmonger_unconfined_exec_t, certwatch_exec_t, checkpc_exec_t, checkpolicy_exec_t, chfn_exec_t, chkpwd_exec_t, chrome_sandbox_exec_t, chrome_sandbox_home_t, chrome_sandbox_nacl_exec_t, chrome_sandbox_tmp_t, chrome_sandbox_tmpfs_t, cifs_t, cloud_init_tmp_t, cluster_tmp_t, cobbler_tmp_t, colord_tmp_t, comsat_tmp_t, condor_master_tmp_t, condor_schedd_tmp_t, condor_startd_tmp_t, config_home_t, config_usr_t, consolehelper_exec_t, couchdb_tmp_t, courier_exec_t, cpu_online_t, cpucontrol_exec_t, cpuspeed_exec_t, crack_db_t, crack_exec_t, crack_tmp_t, crond_tmp_t, crontab_exec_t, crontab_tmp_t, ctdbd_tmp_t, cups_pdf_tmp_t, cupsd_etc_t, cupsd_lpd_tmp_t, cupsd_rw_etc_t, cupsd_tmp_t, cvs_exec_t, cvs_tmp_t, cyphesis_exec_t, cyphesis_tmp_t, cyrus_tmp_t, data_home_t, dbadm_sudo_tmp_t, dbskkd_tmp_t, dbus_home_t, dbusd_etc_t, dbusd_exec_t, dcc_client_exec_t, dcc_client_tmp_t, dcc_dbclean_exec_t, dcc_dbclean_tmp_t, dccd_tmp_t, dccifd_tmp_t, dccm_tmp_t, ddclient_tmp_t, default_context_t, deltacloudd_tmp_t, depmod_exec_t, devicekit_tmp_t, dhcpc_tmp_t, dhcpd_tmp_t, dirsrv_tmp_t, dirsrvadmin_tmp_t, disk_munin_plugin_exec_t, disk_munin_plugin_tmp_t, dmesg_exec_t, dmidecode_exec_t, dosfs_t, dovecot_auth_tmp_t, dovecot_cert_t, dovecot_deliver_tmp_t, dovecot_tmp_t, ecryptfs_t, efivarfs_t, etc_runtime_t, etc_t, exim_exec_t, exim_tmp_t, fail2ban_client_exec_t, fail2ban_tmp_t, fenced_tmp_t, fetchmail_exec_t, fetchmail_home_t, file_context_t, firewalld_tmp_t, firewallgui_exec_t, firewallgui_tmp_t, firstboot_exec_t, fonts_cache_t, fonts_t, fsadm_exec_t, fsadm_tmp_t, fsdaemon_tmp_t, ftpd_tmp_t, ftpdctl_exec_t, ftpdctl_tmp_t, fusefs_t, fusermount_exec_t, games_exec_t, games_tmp_t, gconf_etc_t, gconf_home_t, gconf_tmp_t, gconfd_exec_t, getty_exec_t, getty_tmp_t, git_user_content_t, gitd_exec_t, gitosis_exec_t, gkeyringd_exec_t, gkeyringd_gnome_home_t, gkeyringd_tmp_t, glance_registry_tmp_t, glance_tmp_t, glusterd_tmp_t, gnome_home_t, gpg_agent_exec_t, gpg_agent_tmp_t, gpg_exec_t, gpg_helper_exec_t, gpg_pinentry_tmp_t, gpg_secret_t, gpm_tmp_t, gpsd_exec_t, groupadd_exec_t, gssd_tmp_t, gstreamer_home_t, home_bin_t, home_cert_t, hostname_etc_t, hostname_exec_t, httpd_bugzilla_tmp_t, httpd_collectd_script_tmp_t, httpd_modules_t, httpd_mojomojo_tmp_t, httpd_munin_script_tmp_t, httpd_passwd_exec_t, httpd_php_tmp_t, httpd_suexec_tmp_t, httpd_tmp_t, httpd_user_content_t, httpd_user_htaccess_t, httpd_user_ra_content_t, httpd_user_rw_content_t, httpd_user_script_exec_t, hwclock_exec_t, hwdata_t, icc_data_home_t, iceauth_exec_t, iceauth_home_t, icecast_exec_t, ifconfig_exec_t, inetd_child_tmp_t, inetd_tmp_t, initrc_tmp_t, insmod_exec_t, ipsec_mgmt_exec_t, ipsec_tmp_t, iptables_exec_t, iptables_tmp_t, irc_exec_t, irc_home_t, irc_tmp_t, irssi_exec_t, irssi_home_t, iscsi_tmp_t, iso9660_t, kadmind_tmp_t, kdump_exec_t, kdumpctl_tmp_t, kdumpgui_tmp_t, keystone_tmp_t, kismet_exec_t, kismet_home_t, kismet_tmp_t, kismet_tmpfs_t, klogd_tmp_t, krb5_conf_t, krb5_home_t, krb5_host_rcache_t, krb5kdc_tmp_t, ktalkd_tmp_t, l2tpd_tmp_t, ld_so_cache_t, ld_so_t, ldconfig_exec_t, ldconfig_tmp_t, lib_t, livecd_exec_t, livecd_tmp_t, load_policy_exec_t, loadkeys_exec_t, local_login_home_t, locale_t, locate_exec_t, lockdev_exec_t, login_exec_t, logrotate_mail_tmp_t, logrotate_tmp_t, logwatch_exec_t, logwatch_mail_tmp_t, logwatch_tmp_t, lpd_tmp_t, lpr_exec_t, lpr_tmp_t, lsassd_tmp_t, lvm_exec_t, lvm_tmp_t, machineid_t, mail_home_rw_t, mail_home_t, mail_munin_plugin_exec_t, mail_munin_plugin_tmp_t, mailman_cgi_tmp_t, mailman_mail_tmp_t, mailman_queue_tmp_t, man_cache_t, man_t, mandb_cache_t, mandb_home_t, mcelog_exec_t, mencoder_exec_t, mnt_t, mock_build_exec_t, mock_exec_t, mock_tmp_t, mongod_tmp_t, mount_ecryptfs_exec_t, mount_exec_t, mount_tmp_t, mozilla_exec_t, mozilla_home_t, mozilla_plugin_config_exec_t, mozilla_plugin_exec_t, mozilla_plugin_rw_t, mozilla_plugin_tmp_t, mozilla_plugin_tmpfs_t, mozilla_tmp_t, mpd_exec_t, mpd_tmp_t, mpd_user_data_t, mplayer_exec_t, mplayer_home_t, mrtg_exec_t, mscan_tmp_t, munin_tmp_t, mysqld_home_t, mysqld_tmp_t, nagios_admin_plugin_exec_t, nagios_checkdisk_plugin_exec_t, nagios_eventhandler_plugin_exec_t, nagios_eventhandler_plugin_tmp_t, nagios_mail_plugin_exec_t, nagios_openshift_plugin_exec_t, nagios_openshift_plugin_tmp_t, nagios_services_plugin_exec_t, nagios_system_plugin_exec_t, nagios_system_plugin_tmp_t, nagios_tmp_t, nagios_unconfined_plugin_exec_t, named_checkconf_exec_t, named_tmp_t, namespace_init_exec_t, ncftool_exec_t, ndc_exec_t, net_conf_t, netlabel_mgmt_exec_t, netutils_exec_t, netutils_tmp_t, newrole_exec_t, nfs_t, nova_ajax_tmp_t, nova_api_tmp_t, nova_cert_tmp_t, nova_compute_tmp_t, nova_console_tmp_t, nova_direct_tmp_t, nova_network_tmp_t, nova_objectstore_tmp_t, nova_scheduler_tmp_t, nova_vncproxy_tmp_t, nova_volume_tmp_t, ntop_tmp_t, ntpd_tmp_t, ntpdate_exec_t, nx_server_tmp_t, obex_exec_t, oddjob_mkhomedir_exec_t, openshift_cgroup_read_exec_t, openshift_cgroup_read_tmp_t, openshift_cron_tmp_t, openshift_initrc_tmp_t, openshift_tmp_t, openshift_var_lib_t, openvpn_tmp_t, pads_exec_t, pam_console_exec_t, pam_timestamp_tmp_t, passenger_tmp_t, passwd_exec_t, passwd_file_t, pcscd_var_run_t, pegasus_openlmi_storage_tmp_t, pegasus_tmp_t, pinentry_exec_t, ping_exec_t, piranha_web_tmp_t, pkcsslotd_tmp_t, pki_tomcat_tmp_t, plymouth_exec_t, podsleuth_exec_t, podsleuth_tmp_t, policykit_auth_exec_t, policykit_grant_exec_t, policykit_reload_t, policykit_resolve_exec_t, policykit_tmp_t, policykit_var_lib_t, polipo_cache_home_t, polipo_config_home_t, polipo_exec_t, portmap_helper_exec_t, portmap_tmp_t, postfix_bounce_tmp_t, postfix_cleanup_tmp_t, postfix_exec_t, postfix_local_tmp_t, postfix_map_exec_t, postfix_map_tmp_t, postfix_pickup_tmp_t, postfix_pipe_tmp_t, postfix_postdrop_exec_t, postfix_postdrop_t, postfix_postqueue_exec_t, postfix_qmgr_tmp_t, postfix_showq_exec_t, postfix_smtp_tmp_t, postfix_smtpd_tmp_t, postfix_virtual_tmp_t, postgresql_tmp_t, pppd_tmp_t, prelink_exec_t, prelink_tmp_t, prelude_lml_tmp_t, proc_t, procmail_exec_t, procmail_home_t, procmail_tmp_t, psad_tmp_t, ptchown_exec_t, public_content_rw_t, public_content_t, pulseaudio_exec_t, pulseaudio_home_t, puppet_tmp_t, puppetca_exec_t, puppetmaster_tmp_t, pwauth_exec_t, qemu_exec_t, qmail_tcp_env_exec_t, qpidd_tmp_t, quantum_tmp_t, quota_exec_t, racoon_tmp_t, readable_t, readahead_exec_t, realmd_exec_t, realmd_tmp_t, removable_t, restorecond_exec_t, rhev_agentd_tmp_t, ricci_tmp_t, rlogind_home_t, rlogind_tmp_t, rpm_exec_t, rpm_script_tmp_t, rpm_tmp_t, rpm_var_cache_t, rpm_var_lib_t, rssh_chroot_helper_exec_t, rssh_exec_t, rssh_ro_t, rssh_rw_t, rsync_exec_t, rsync_tmp_t, rtkit_daemon_exec_t, run_init_exec_t, samba_etc_t, samba_net_exec_t, samba_net_tmp_t, samba_var_t, sambagui_exec_t, screen_exec_t, screen_home_t, secadm_sudo_tmp_t, sectool_tmp_t, security_t, selinux_config_t, selinux_munin_plugin_exec_t, selinux_munin_plugin_tmp_t, semanage_exec_t, semanage_tmp_t, sendmail_exec_t, sendmail_tmp_t, services_munin_plugin_exec_t, services_munin_plugin_tmp_t, session_dbusd_tmp_t, setfiles_exec_t, setkey_exec_t, setsebool_exec_t, seunshare_exec_t, sge_job_exec_t, sge_shepherd_exec_t, sge_tmp_t, shell_exec_t, shorewall_tmp_t, showmount_exec_t, slapd_cert_t, slapd_tmp_t, smbcontrol_exec_t, smbd_tmp_t, smoltclient_exec_t, smoltclient_tmp_t, smsd_tmp_t, snort_tmp_t, sosreport_exec_t, sosreport_tmp_t, soundd_tmp_t, spamc_exec_t, spamc_home_t, spamc_tmp_t, spamd_tmp_t, spamd_update_exec_t, squid_cron_exec_t, squid_tmp_t, squirrelmail_spool_t, src_t, ssh_agent_exec_t, ssh_agent_tmp_t, ssh_exec_t, ssh_home_t, ssh_keygen_exec_t, ssh_keysign_exec_t, sssd_public_t, sssd_var_lib_t, staff_sudo_tmp_t, stapserver_tmp_t, stunnel_tmp_t, su_exec_t, sudo_exec_t, sulogin_exec_t, svc_multilog_exec_t, svc_run_exec_t, svc_start_exec_t, svirt_home_t, svirt_lxc_file_t, svirt_tmp_t, svnserve_tmp_t, swat_tmp_t, sysadm_passwd_tmp_t, sysadm_sudo_tmp_t, sysctl_fs_t, sysctl_t, sysfs_t, syslogd_tmp_t, sysstat_exec_t, system_cronjob_tmp_t, system_cronjob_var_lib_t, system_dbusd_tmp_t, system_dbusd_var_lib_t, system_mail_tmp_t, system_munin_plugin_exec_t, system_munin_plugin_tmp_t, systemd_logind_sessions_t, systemd_logind_var_run_t, sysv_t, tcpd_tmp_t, telepathy_cache_home_t, telepathy_data_home_t, telepathy_gabble_cache_home_t, telepathy_gabble_exec_t, telepathy_gabble_tmp_t, telepathy_idle_exec_t, telepathy_idle_tmp_t, telepathy_logger_cache_home_t, telepathy_logger_data_home_t, telepathy_logger_exec_t, telepathy_logger_tmp_t, telepathy_mission_control_cache_home_t, telepathy_mission_control_data_home_t, telepathy_mission_control_exec_t, telepathy_mission_control_home_t, telepathy_mission_control_tmp_t, telepathy_msn_exec_t, telepathy_msn_tmp_t, telepathy_salut_exec_t, telepathy_salut_tmp_t, telepathy_sofiasip_exec_t, telepathy_sofiasip_tmp_t, telepathy_stream_engine_exec_t, telepathy_stream_engine_tmp_t, telepathy_sunshine_exec_t, telepathy_sunshine_home_t, telepathy_sunshine_tmp_t, telnetd_tmp_t, tetex_data_t, textrel_shlib_t, tgtd_tmp_t, thumb_exec_t, thumb_home_t, thumb_tmp_t, tmp_t, tmpreaper_exec_t, tomcat_tmp_t, traceroute_exec_t, tuned_tmp_t, tvtime_exec_t, tvtime_home_t, tvtime_tmp_t, udev_tmp_t, udev_var_run_t, uml_exec_t, uml_ro_t, uml_rw_t, uml_tmp_t, unconfined_exec_t, unconfined_munin_plugin_exec_t, unconfined_munin_plugin_tmp_t, update_modules_exec_t, update_modules_tmp_t, updfstab_exec_t, updpwd_exec_t, usbfs_t, usbmodules_exec_t, usbmuxd_exec_t, user_fonts_cache_t, user_fonts_config_t, user_fonts_t, user_home_t, user_mail_tmp_t, user_tmp_t, user_tmpfs_t, useradd_exec_t, userhelper_exec_t, usernetctl_exec_t, usr_t, utempter_exec_t, uucpd_tmp_t, uux_exec_t, var_spool_t, varnishd_tmp_t, vbetool_exec_t, virsh_exec_t, virt_content_t, virt_home_t, virt_qemu_ga_tmp_t, virt_qemu_ga_unconfined_exec_t, virt_tmp_t, virtd_lxc_exec_t, vlock_exec_t, vmblock_t, vmware_conf_t, vmware_exec_t, vmware_file_t, vmware_host_tmp_t, vmware_tmp_t, vnstat_exec_t, vpnc_exec_t, vpnc_tmp_t, vxfs_t, webadm_tmp_t, webalizer_exec_t, webalizer_tmp_t, wine_exec_t, wine_home_t, wine_tmp_t, wireshark_exec_t, wireshark_home_t, wireshark_tmp_t, wpa_cli_exec_t, xauth_exec_t, xauth_home_t, xauth_tmp_t, xdm_etc_t, xdm_exec_t, xdm_home_t, xdm_tmp_t, xdm_unconfined_exec_t, xdm_var_run_t, xend_tmp_t, xenfs_t, xenstored_tmp_t, xserver_exec_t, xserver_tmpfs_t, xsession_exec_t, ypbind_tmp_t, ypserv_tmp_t, zabbix_tmp_t, zarafa_deliver_tmp_t, zarafa_indexer_tmp_t, zarafa_server_tmp_t, zarafa_var_lib_t, zebra_tmp_t, zos_remote_exec_t. 
次にこれを実行してください: 
restorecon -v '/var/cache/ibus/bus/registry'


*****  Plugin catchall (17.1 confidence) suggests  ***************************

If ibus-daemon に、 registry file の read アクセスがデフォルトで許可されるべきです。   
Then バグとして報告してください。 
ローカルのポリシーモジュールを生成すると、 このアクセスを許可することができます。
Do
このアクセスを一時的に許可するには、以下を実行してください。:
# grep ibus-daemon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                xguest_u:xguest_r:xguest_t:s0
Target Context                unconfined_u:object_r:var_t:s0
Target Objects                /var/cache/ibus/bus/registry [ file ]
Source                        ibus-daemon
Source Path                   /usr/bin/ibus-daemon
Port                          <不明>
Host                          (removed)
Source RPM Packages           ibus-1.5.3-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.x86_64 #1 SMP Wed
                              Aug 21 19:27:58 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-09-01 06:49:19 JST
Last Seen                     2013-09-01 06:49:19 JST
Local ID                      48b5b52d-009d-4bba-b9c9-30bfedb069cd

Raw Audit Messages
type=AVC msg=audit(1377985759.71:526): avc:  denied  { read } for  pid=4628 comm="ibus-daemon" name="registry" dev="dm-1" ino=1445038 scontext=xguest_u:xguest_r:xguest_t:s0 tcontext=unconfined_u:object_r:var_t:s0 tclass=file


type=SYSCALL msg=audit(1377985759.71:526): arch=x86_64 syscall=open success=no exit=EACCES a0=21de9e0 a1=0 a2=36ef54959c a3=36ef532230 items=0 ppid=4627 pid=4628 auid=1005 uid=1005 gid=1013 euid=1005 suid=1005 fsuid=1005 egid=1013 sgid=1013 fsgid=1013 ses=3 tty=(none) comm=ibus-daemon exe=/usr/bin/ibus-daemon subj=xguest_u:xguest_r:xguest_t:s0 key=(null)

Hash: ibus-daemon,xguest_t,var_t,file,read

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.9-200.fc19.x86_64
type:           libreport