Bug 595164

Summary: SELinux is preventing the kdm from using potentially mislabeled files (/root).
Product: [Fedora] Fedora Reporter: Steven Nelli <astroguynm>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: astroguynm, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:495fb46dfacf240548403d98f4f338fdc4cb4302e92a48f1d7477448b1e81d5c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-24 07:22:00 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 Steven Nelli 2010-05-23 18:34:00 UTC
Summary:

SELinux is preventing the kdm from using potentially mislabeled files (/root).

Detailed Description:

SELinux has denied kdm access to potentially mislabeled file(s) (/root). This
means that SELinux will not allow kdm to use these files. It is common for users
to edit files in their home directory or tmp directories and then move (mv) them
to system directories. The problem is that the files end up with the wrong file
context which confined applications are not allowed to access.

Allowing Access:

If you want kdm to access this files, you need to relabel them using restorecon
-v '/root'. You might want to relabel the entire directory using restorecon -R
-v '/root'.

Additional Information:

Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:admin_home_t:s0
Target Objects                /root [ dir ]
Source                        kdm
Source Path                   2F7573722F62696E2F6B646D202864656C6574656429
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           filesystem-2.4.21-1.fc11
Policy RPM                    selinux-policy-3.6.12-94.fc11
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   home_tmp_bad_labels
Host Name                     (removed)
Platform                      Linux (removed) 2.6.30.10-105.2.23.fc11.i586 #1
                              SMP Thu Feb 11 06:51:26 UTC 2010 i686 i686
Alert Count                   59
First Seen                    Fri 06 Nov 2009 09:20:05 AM EST
Last Seen                     Mon 15 Feb 2010 08:08:16 PM EST
Local ID                      317650d1-2276-4b78-8d91-5a38c107c532
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1266282496.815:23272): avc:  denied  { write } for  pid=8563 comm="kdm" name="root" dev=dm-0 ino=252 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1266282496.815:23272): arch=40000003 syscall=5 success=no exit=-13 a0=8065cdb a1=8a41 a2=180 a3=8065cdb items=0 ppid=8486 pid=8563 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=29 comm="kdm" exe=2F7573722F62696E2F6B646D202864656C6574656429 subj=system_u:system_r:xdm_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  home_tmp_bad_labels,kdm,xdm_t,admin_home_t,dir,write
audit2allow suggests:

#============= xdm_t ==============
#!!!! The source type 'xdm_t' can write to a 'dir' of the following types:
# xserver_log_t, var_log_t, xdm_log_t, pam_var_run_t, xdm_var_lib_t, xdm_var_run_t, xdm_home_t, pam_var_console_t, pcscd_var_run_t, xkb_var_lib_t, xdm_rw_etc_t, var_lock_t, root_t, tmp_t, var_t, user_fonts_t, user_tmpfs_t, xdm_spool_t, fonts_cache_t, user_home_dir_t, locale_t, var_auth_t, tmpfs_t, var_spool_t, user_tmp_t, auth_cache_t, var_lib_t, var_run_t, xdm_tmpfs_t, xdm_tmp_t, root_t, nfs_t

allow xdm_t admin_home_t:dir write;

Comment 1 Miroslav Grepl 2010-05-24 07:22:00 UTC

*** This bug has been marked as a duplicate of bug 595167 ***