Bug 549063 - SELinux is preventing /usr/bin/freshclam "connectto" access on /var/run/clamav/clamd.socket.
Summary: SELinux is preventing /usr/bin/freshclam "connectto" access on /var/run/clama...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 12
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:cd53b906d58...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-12-20 08:54 UTC by Gaetan Cambier
Modified: 2010-01-08 20:09 UTC (History)
2 users (show)

Fixed In Version: 3.6.32-66.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-01-08 20:09:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gaetan Cambier 2009-12-20 08:54:41 UTC
Résumé:

SELinux is preventing /usr/bin/freshclam "connectto" access on
/var/run/clamav/clamd.socket.

Description détaillée:

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

SELinux denied access requested by freshclam. It is not expected that this
access is required by freshclam and this access may signal an intrusion attempt.
It is also possible that the specific version or configuration of the
application is causing it to require additional access.

Autoriser l'accès:

You can generate a local policy module to allow this access - see FAQ
(http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug
report.

Informations complémentaires:

Contexte source               system_u:system_r:freshclam_t:s0-s0:c0.c1023
Contexte cible                unconfined_u:unconfined_r:unconfined_t:s0
Objets du contexte            /var/run/clamav/clamd.socket [ unix_stream_socket
                              ]
source                        freshclam
Chemin de la source           /usr/bin/freshclam
Port                          <Inconnu>
Hôte                         (removed)
Paquetages RPM source         clamav-update-0.95.2-5.fc12
Paquetages RPM cible          
Politique RPM                 selinux-policy-3.6.32-56.fc12
Selinux activé               True
Type de politique             targeted
Mode strict                   Permissive
Nom du plugin                 catchall
Nom de l'hôte                (removed)
Plateforme                    Linux (removed)
                              2.6.31.6-166.fc12.i686.PAE #1 SMP Wed Dec 9
                              11:00:30 EST 2009 i686 athlon
Compteur d'alertes            1
Première alerte              dim 20 déc 2009 06:08:36 CET
Dernière alerte              dim 20 déc 2009 06:08:36 CET
ID local                      9a039574-d977-4de2-9de8-51095dfdd9c0
Numéros des lignes           

Messages d'audit bruts        

node=(removed) type=AVC msg=audit(1261285716.83:11485): avc:  denied  { connectto } for  pid=11802 comm="freshclam" path="/var/run/clamav/clamd.socket" scontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:unconfined_t:s0 tclass=unix_stream_socket

node=(removed) type=SYSCALL msg=audit(1261285716.83:11485): arch=40000003 syscall=102 success=yes exit=0 a0=3 a1=bfd60650 a2=98d3ef0 a3=4 items=0 ppid=11727 pid=11802 auid=0 uid=492 gid=488 euid=492 suid=492 fsuid=492 egid=488 sgid=488 fsgid=488 tty=(none) ses=1031 comm="freshclam" exe="/usr/bin/freshclam" subj=system_u:system_r:freshclam_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  selinux-policy-3.6.32-56.fc12,catchall,freshclam,freshclam_t,unconfined_t,unix_stream_socket,connectto
audit2allow suggests:

#============= freshclam_t ==============
allow freshclam_t unconfined_t:unix_stream_socket connectto;

Comment 1 Daniel Walsh 2009-12-21 15:34:03 UTC
This looks like you are running the clamav as a user rather then through the start up scripts.  If you use the init scripts the services should be able to communicate.

Comment 2 Gaetan Cambier 2009-12-28 10:29:04 UTC
I use the "clamav" user for clamd and "clamupdate" user for freshclam

whem freshclam is launch via cron : 
"0  */3 * * * root /usr/share/clamav/freshclam-sleep"

it swith into clamudate user for running

but the notification is blocked by selinux

Comment 3 Daniel Walsh 2009-12-29 23:42:06 UTC
You can add these rules for now using

# grep clam /var/log/audit/audit.log | audit2allow -M myclamav
# semodule -i myclamav.pp

Fixed in selinux-policy-3.6.32-65.fc12.noarch

Comment 4 Fedora Update System 2010-01-04 21:53:13 UTC
selinux-policy-3.6.32-66.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-66.fc12

Comment 5 Fedora Update System 2010-01-05 22:49:14 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 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/F12/FEDORA-2010-0184

Comment 6 Gaetan Cambier 2010-01-07 17:36:21 UTC
This is ok for me. Tkx

Comment 7 Fedora Update System 2010-01-08 20:03:58 UTC
selinux-policy-3.6.32-66.fc12 has been pushed to the Fedora 12 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.