Bug 540937

Summary: SELinux is preventing xenstored (xenstored_t) "search" to / (nfs_t).
Product: [Fedora] Fedora Reporter: Gaetan Cambier <gaetan>
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: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:3c98b8fb1cce95d09fa78680f761b48e0d8128628cd050f285a3e9a1ba156a61
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-24 15:02:25 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 Gaetan Cambier 2009-11-24 14:41:25 UTC
Résumé:

SELinux is preventing xenstored (xenstored_t) "search" to / (nfs_t).

Description détaillée:

[SELinux est en mode permissif. Cet accès n'a pas été refusé.]

SELinux denied access requested by xenstored. / may be a mislabeled. / default
SELinux type is root_t, but its current type is nfs_t. Changing this file back
to the default type, may fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creates a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Autoriser l'accès:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/', if this file is a directory, you can
recursively restore using restorecon -R '/'.

Commande de correction:

restorecon '/'

Informations complémentaires:

Contexte source               system_u:system_r:xenstored_t:s0
Contexte cible                system_u:object_r:nfs_t:s0
Objets du contexte            / [ dir ]
source                        xenstored
Chemin de la source           /usr/sbin/xenstored
Port                          <Inconnu>
Hôte                         (removed)
Paquetages RPM source         xen-runtime-3.4.1-1.fc11
Paquetages RPM cible          filesystem-2.4.21-1.fc11
Politique RPM                 selinux-policy-3.6.12-82.fc11
Selinux activé               True
Type de politique             targeted
Mode strict                   Permissive
Nom du plugin                 restorecon
Nom de l'hôte                (removed)
Plateforme                    Linux (removed)
                              2.6.31-1.2.68.xendom0.fc12.i686.PAE #1 SMP Sat Sep
                              19 13:21:38 EDT 2009 i686 athlon
Compteur d'alertes            1
Première alerte              lun 28 sep 2009 20:21:43 CEST
Dernière alerte              lun 28 sep 2009 20:21:43 CEST
ID local                      d5dbcb7e-2f8b-4696-bf63-ec9a9a606957
Numéros des lignes           

Messages d'audit bruts        

node=(removed) type=AVC msg=audit(1254162103.172:16): avc:  denied  { search } for  pid=2288 comm="xenstored" name="/" dev=xenfs ino=1 scontext=system_u:system_r:xenstored_t:s0 tcontext=system_u:object_r:nfs_t:s0 tclass=dir

node=(removed) type=SYSCALL msg=audit(1254162103.172:16): arch=40000003 syscall=5 success=yes exit=10 a0=3a8feb a1=8002 a2=0 a3=1 items=0 ppid=1 pid=2288 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="xenstored" exe="/usr/sbin/xenstored" subj=system_u:system_r:xenstored_t:s0 key=(null)



Hash String generated from  selinux-policy-3.6.12-82.fc11,restorecon,xenstored,xenstored_t,nfs_t,dir,search
audit2allow suggests:

#============= xenstored_t ==============
allow xenstored_t nfs_t:dir search;

Comment 1 Daniel Walsh 2009-11-24 15:02:25 UTC

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