This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 838511 - service clamd.amavisd cannot access /var/run/amavisd directory
service clamd.amavisd cannot access /var/run/amavisd directory
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.9
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-09 06:03 EDT by Milos Malik
Modified: 2013-01-07 22:32 EST (History)
1 user (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-329.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:32:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2012-07-09 06:03:36 EDT
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.4.6-328.el5
selinux-policy-2.4.6-328.el5
selinux-policy-devel-2.4.6-328.el5
amavisd-new-2.4.5-1.el5

How reproducible:
always

Steps to Reproduce:
# grep -v -e '^#' -e '^$' /etc/clamd.d/amavisd.conf 
LogSyslog 1
LogFacility LOG_MAIL
PidFile /var/run/amavisd/clamd.pid
FixStaleSocket 1
User amavis
LocalSocket /var/spool/amavisd/clamd.sock
# service clamd.amavisd restart
Stopping clamd.amavisd:                                    [FAILED]
Starting clamd.amavisd: LibClamAV Warning: **************************************************
LibClamAV Warning: ***  The virus database is older than 7 days!  ***
LibClamAV Warning: ***   Please update it as soon as possible.    ***
LibClamAV Warning: **************************************************
                                                           [  OK  ]
# ausearch -m avc -ts recent
  
Actual results:
----
time->Mon Jul  9 06:02:01 2012
type=SYSCALL msg=audit(1341828121.581:35250): arch=40000003 syscall=10 success=no exit=-13 a0=90d8268 a1=90d6448 a2=90d6408 a3=1 items=0 ppid=1 pid=32167 auid=0 uid=102 gid=159 euid=102 suid=102 fsuid=102 egid=159 sgid=159 fsgid=159 tty=(none) ses=3452 comm="clamd" exe="/usr/sbin/clamd" subj=root:system_r:clamd_t:s0 key=(null)
type=AVC msg=audit(1341828121.581:35250): avc:  denied  { search } for  pid=32167 comm="clamd" name="amavisd" dev=dm-0 ino=3506181 scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
----
time->Mon Jul  9 06:02:13 2012
type=SYSCALL msg=audit(1341828133.748:35251): arch=40000003 syscall=5 success=no exit=-13 a0=8d31268 a1=241 a2=1b6 a3=8d32bc8 items=0 ppid=32248 pid=32249 auid=0 uid=102 gid=159 euid=102 suid=102 fsuid=102 egid=159 sgid=159 fsgid=159 tty=(none) ses=3452 comm="clamd" exe="/usr/sbin/clamd" subj=root:system_r:clamd_t:s0 key=(null)
type=AVC msg=audit(1341828133.748:35251): avc:  denied  { search } for  pid=32249 comm="clamd" name="amavisd" dev=dm-0 ino=3506181 scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
----

Expected results:
* no AVCs
Comment 1 RHEL Product and Program Management 2012-07-09 06:08:57 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 2 Miroslav Grepl 2012-07-10 01:45:44 EDT
And what are you getting in permissive mode?
Comment 3 Milos Malik 2012-07-10 04:47:44 EDT
----
time->Tue Jul 10 04:45:13 2012
type=SYSCALL msg=audit(1341909913.962:41877): arch=40000003 syscall=5 success=yes exit=5 a0=9dac268 a1=241 a2=1b6 a3=9de31e0 items=0 ppid=20907 pid=20908 auid=0 uid=102 gid=159 euid=102 suid=102 fsuid=102 egid=159 sgid=159 fsgid=159 tty=(none) ses=4225 comm="clamd" exe="/usr/sbin/clamd" subj=root:system_r:clamd_t:s0 key=(null)
type=AVC msg=audit(1341909913.962:41877): avc:  denied  { add_name } for  pid=20908 comm="clamd" name="clamd.pid" scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
type=AVC msg=audit(1341909913.962:41877): avc:  denied  { write } for  pid=20908 comm="clamd" name="amavisd" dev=dm-0 ino=3506181 scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
type=AVC msg=audit(1341909913.962:41877): avc:  denied  { search } for  pid=20908 comm="clamd" name="amavisd" dev=dm-0 ino=3506181 scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
----
time->Tue Jul 10 04:46:12 2012
type=SYSCALL msg=audit(1341909972.259:41878): arch=40000003 syscall=10 success=yes exit=0 a0=9dac268 a1=9daa448 a2=9daa408 a3=1 items=0 ppid=1 pid=20908 auid=0 uid=102 gid=159 euid=102 suid=102 fsuid=102 egid=159 sgid=159 fsgid=159 tty=(none) ses=4225 comm="clamd" exe="/usr/sbin/clamd" subj=root:system_r:clamd_t:s0 key=(null)
type=AVC msg=audit(1341909972.259:41878): avc:  denied  { remove_name } for  pid=20908 comm="clamd" name="clamd.pid" dev=dm-0 ino=3506292 scontext=root:system_r:clamd_t:s0 tcontext=system_u:object_r:amavis_var_run_t:s0 tclass=dir
----
Comment 4 Miroslav Grepl 2012-07-11 07:30:46 EDT
Ok, we need to fix

amavis_create_pid_files()

interface. I am adding fixes to Fedora.
Comment 8 errata-xmlrpc 2013-01-07 22:32:22 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0060.html

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