Bug 596444 - SELinux empêche /usr/sbin/prelink d'"read" au périphérique /etc/pki/tls/certs/Makefile.
Summary: SELinux empêche /usr/sbin/prelink d'"read" au périphérique /etc/pki/tls/certs...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:93f117ea120...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-26 18:37 UTC by Carl G.
Modified: 2010-07-06 17:08 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.7.19-33.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-06 17:08:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Carl G. 2010-05-26 18:37:46 UTC
Résumé:

SELinux empêche /usr/sbin/prelink d'"read" au périphérique
/etc/pki/tls/certs/Makefile.

Description détaillée:

[prelink a un type permissif (prelink_t). Cet accès n'a pas été refusé.]

SELinux a empêché prelink d'read à /etc/pki/tls/certs/Makefile. Le programme
prelink n'est autorisé qu'à manipuler des fichiers qui sont identifiés par
SELinux en tant que exécutables ou bibliothèques partagées. Les
bibliothèques placées dans les répertoires de bibliothèques sont
étiquetées par défaut comme des bibliothèques partagées. De la même
manière, les exécutables placés dans les répertoires bin ou sbin sont
étiquetés comme des exécutables par SELinux. Cependant, si ces fichiers sont
installés dans d'autres répertoires, ils peuvent ne pas avoir le même
étiquetage. Si prelink essaye de manipuler un fichier qui n'est pas un fichier
binaire ou de partager une bibliothèque, cela peut indiquer une

Autoriser l'accès:

Vous pouvez modifier le contexte de fichier en exécutant "chcon -t bin_t
'/etc/pki/tls/certs/Makefile'" ou "chcon -t lib_t '/etc/pki/tls/certs/Makefile'"
s'il s'agit d'une bibliothèque partagée. Si vous souhaitez rendre ces
modifications permanentes, vous devez exécuter la commande semanage. "semanage
fcontext -a -t bin_t '/etc/pki/tls/certs/Makefile'" ou "semanage fcontext -a -t
lib_t '/etc/pki/tls/certs/Makefile'". Si vous pressentez que cet exécutable ou
que cette bibliothèque partagée est dans un répertoire inapproprié, merci de
remplir un rapport de bug sur la paquet qui comprend le fichier. Si vous pensez
que SELinux devrait connaître ce fichier et son étiquetage, merci de remplir
un rapport de bogue sur SELinux po

Informations complémentaires:

Contexte source               system_u:system_r:prelink_t:s0-s0:c0.c1023
Contexte cible                system_u:object_r:cert_t:s0
Objets du contexte            /etc/pki/tls/certs/Makefile [ file ]
source                        prelink
Chemin de la source           /usr/sbin/prelink
Port                          <Inconnu>
Hôte                         (supprimé)
Paquetages RPM source         prelink-0.4.3-3.fc13
Paquetages RPM cible          openssl-1.0.0-1.fc13
Politique RPM                 selinux-policy-3.7.19-15.fc13
Selinux activé               True
Type de politique             targeted
Mode strict                   Enforcing
Nom du plugin                 prelink_mislabled
Nom de l'hôte                (supprimé)
Plateforme                    Linux (supprimé) 2.6.33.4-95.fc13.x86_64
                              #1 SMP Thu May 13 05:16:23 UTC 2010 x86_64 x86_64
Compteur d'alertes            14
Première alerte              mer. 26 mai 2010 14:36:04 EDT
Dernière alerte              mer. 26 mai 2010 14:36:04 EDT
ID local                      0fa18a2a-0bc6-4537-aca5-c47ac5ff65c1
Numéros des lignes           

Messages d'audit bruts        

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/certs/Makefile" dev=dm-2 ino=131348 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/certs/make-dummy-cert" dev=dm-2 ino=131349 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/misc/CA" dev=dm-2 ino=131351 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/misc/c_hash" dev=dm-2 ino=131352 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/misc/c_info" dev=dm-2 ino=131353 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/misc/c_issuer" dev=dm-2 ino=131354 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=AVC msg=audit(1274898964.859:325): avc:  denied  { read } for  pid=29630 comm="prelink" path="/etc/pki/tls/misc/c_name" dev=dm-2 ino=131355 scontext=system_u:system_r:prelink_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cert_t:s0 tclass=file

node=(supprimé) type=SYSCALL msg=audit(1274898964.859:325): arch=c000003e syscall=59 success=yes exit=0 a0=40dd7a a1=7fff78dacb10 a2=7fff78db2528 a3=3144a17240 items=0 ppid=29621 pid=29630 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="prelink" exe="/usr/sbin/prelink" subj=system_u:system_r:prelink_t:s0-s0:c0.c1023 key=(null)


yum update gnutls?
Hash String generated from  prelink_mislabled,prelink,prelink_t,cert_t,file,read
audit2allow suggests:

#============= prelink_t ==============
allow prelink_t cert_t:file read;

Comment 1 Daniel Walsh 2010-05-26 21:02:03 UTC
Why is prelink in reading these files?  Are they all marked as executables?

Comment 2 Carl G. 2010-05-26 21:26:28 UTC
-rw-r--r--. 1 root root 720649 15 janv. 12:11 ca-bundle.crt
-rwxr-xr-x. 1 root root    610 18 mai   12:12 make-dummy-cert
-rw-r--r--. 1 root root   2242 18 mai   12:12 Makefile

-rwxr-xr-x. 1 root root 5178 18 mai   12:11 CA
-rwxr-xr-x. 1 root root  119 18 mai   12:11 c_hash
-rwxr-xr-x. 1 root root  152 18 mai   12:11 c_info
-rwxr-xr-x. 1 root root  112 18 mai   12:11 c_issuer
-rwxr-xr-x. 1 root root  110 18 mai   12:11 c_name

The AVC appeared when i was executing yum updates (GnuTLS got updated).

Comment 3 Carl G. 2010-05-26 21:30:05 UTC
system_u:object_r:cert_t:s0

is the label of the files above.

Comment 4 Daniel Walsh 2010-05-27 14:32:43 UTC
Right are these files executables.  The problem is prelink needs to be able to /read/write all executables on the system.  Since these are in the cert directory it seems pretty strange place for exes.  If you relabel them to bin_t this AVC will go away.  Should we label these as bin_t by default?

Comment 5 Carl G. 2010-06-11 16:49:27 UTC
(In reply to comment #4)
> Right are these files executables.  The problem is prelink needs to be able to
> /read/write all executables on the system.  Since these are in the cert
> directory it seems pretty strange place for exes.  If you relabel them to bin_t
> this AVC will go away.  Should we label these as bin_t by default?    

CC tmraz?

Comment 6 Daniel Walsh 2010-06-16 15:44:52 UTC
Miroslav add labeling

/etc/pki/tls/certs/make-dummy-cert -- 	gen_context(system_u:object_r:bin_t,s0)
/etc/pki/tls/misc(/.*)?		-- 	gen_context(system_u:object_r:bin_t,s0)

Comment 7 Miroslav Grepl 2010-06-16 16:40:31 UTC
Fixed in selinux-policy-3.7.19-30.fc13

Comment 8 Fedora Update System 2010-06-30 19:54:06 UTC
selinux-policy-3.7.19-33.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 9 Fedora Update System 2010-07-01 18:47:54 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-33.fc13

Comment 10 Fedora Update System 2010-07-06 17:06:23 UTC
selinux-policy-3.7.19-33.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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