Bug 624777

Summary: SELinux empêche l'accès en « search » à /usr/bin/clamscan on /var/spool/ama
Product: [Fedora] Fedora Reporter: Nicolas Mailhot <nicolas.mailhot>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:77f28da67abdfb902cd2a429b27f4ce7c0c43579abca3a553b341d3657add641
Fixed In Version: selinux-policy-3.8.8-20.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-09-01 06:03:16 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 Nicolas Mailhot 2010-08-17 18:10:16 UTC
Résumé:

SELinux empêche l'accès en « search » à /usr/bin/clamscan on /var/spool/ama

Description détaillée:

SELinux a refusé l'accès demandé par clamscan. Il n'est pas prévu que cet
accès soit requis par clamscan et cet accès peut signaler une tentative
d'intrusion. Il est également possible que cette version ou cette configuration
spécifique de l'application provoque cette demande d'accès supplémenta

Autoriser l'accès:

Vous pouvez créer un module de stratégie locale pour autoriser cet accès -
lisez la FAQ (http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Merci de
remplir un rapport de bogue.

Informations complémentaires:

Contexte source               unconfined_u:system_r:clamscan_t:s0
Contexte cible                system_u:object_r:amavis_spool_t:s0
Objets du contexte            /var/spool/amavisd [ dir ]
source                        clamscan
Chemin de la source           /usr/bin/clamscan
Port                          <Inconnu>
Hôte                         (supprimé)
Paquetages RPM source         clamav-0.96.2-1400.fc14
Paquetages RPM cible          amavisd-new-2.6.4-1.fc14
Politique RPM                 selinux-policy-3.8.8-15.fc14
Selinux activé               True
Type de politique             targeted
Mode strict                   Enforcing
Nom du plugin                 catchall
Nom de l'hôte                (supprimé)
Plateforme                    Linux (supprimé) 2.6.35.2-8.fc14.x86_64 #1 SMP Sun
                              Aug 15 08:38:26 UTC 2010 x86_64 x86_64
Compteur d'alertes            36
Première alerte              mar. 17 août 2010 20:00:12 CEST
Dernière alerte              mar. 17 août 2010 20:09:35 CEST
ID local                      4764df75-e7cb-46b7-884a-7f982552f8cb
Numéros des lignes           

Messages d'audit bruts        

node=(supprimé) type=AVC msg=audit(1282068575.277:216): avc:  denied  { search } for  pid=14593 comm="clamscan" name="amavisd" dev=dm-1 ino=271605 scontext=unconfined_u:system_r:clamscan_t:s0 tcontext=system_u:object_r:amavis_spool_t:s0 tclass=dir

node=(supprimé) type=SYSCALL msg=audit(1282068575.277:216): arch=c000003e syscall=4 success=no exit=-13 a0=92f4d0 a1=7fffc88732f0 a2=7fffc88732f0 a3=30322d736976616d items=0 ppid=2771 pid=14593 auid=500 uid=490 gid=485 euid=490 suid=490 fsuid=490 egid=485 sgid=485 fsgid=485 tty=(none) ses=1 comm="clamscan" exe="/usr/bin/clamscan" subj=unconfined_u:system_r:clamscan_t:s0 key=(null)



Hash String generated from  catchall,clamscan,clamscan_t,amavis_spool_t,dir,search
audit2allow suggests:

#============= clamscan_t ==============
allow clamscan_t amavis_spool_t:dir search;

Comment 1 Daniel Walsh 2010-08-19 09:57:42 UTC
Miroslav modify 

interface(`amavis_read_spool_files',`
	gen_require(`
		type amavis_spool_t;
	')

	files_search_spool($1)
	read_files_pattern($1, amavis_spool_t, amavis_spool_t)
')

You can add these rules for now using

# grep avc /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Fixed in selinux-policy-3.8.8-17.fc14

Comment 2 Fedora Update System 2010-08-25 03:11:33 UTC
selinux-policy-3.8.8-20.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/selinux-policy-3.8.8-20.fc14

Comment 3 Fedora Update System 2010-08-25 13:31:17 UTC
selinux-policy-3.8.8-20.fc14 has been pushed to the Fedora 14 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.8.8-20.fc14

Comment 4 Fedora Update System 2010-08-26 18:37:38 UTC
selinux-policy-3.8.8-20.fc14 has been pushed to the Fedora 14 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.8.8-20.fc14

Comment 5 Fedora Update System 2010-09-01 06:01:55 UTC
selinux-policy-3.8.8-20.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.