Bug 607030

Summary: SELinux is preventing /usr/bin/freshclam "execmem" access .
Product: [Fedora] Fedora Reporter: Wong Onn Chee <ocwong>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: campbecg, datahal42, dwalsh, eddie, fedora.jrg01, fhauva, frankly3d, GJahchan, hobbes1069, jamundso, kanelxake, mgrepl, mishu, nb, ondrejj, prd-fedora, redhat-bugzilla, rh-bugzilla, skotchman, steve
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:ed7f15a6da3995a9d8cb3a1696a9acc8efd8aff5f7590d8a76b89042c80c5e86
Fixed In Version: selinux-policy-3.6.32-120.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-20 01:45:19 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 Wong Onn Chee 2010-06-23 01:51:27 UTC
Summary:

SELinux is preventing /usr/bin/freshclam "execmem" access .

Detailed Description:

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.

Allowing Access:

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

Additional Information:

Source Context                system_u:system_r:freshclam_t:s0-s0:c0.c1023
Target Context                system_u:system_r:freshclam_t:s0-s0:c0.c1023
Target Objects                None [ process ]
Source                        freshclam
Source Path                   /usr/bin/freshclam
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           clamav-0.96.1-50.fc12
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.32-118.fc12
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.32.14-134.fc12.i686.PAE #1 SMP Tue Jun 15
                              19:56:25 UTC 2010 i686 i686
Alert Count                   19
First Seen                    Tue 08 Jun 2010 03:06:17 AM SGT
Last Seen                     Wed 23 Jun 2010 09:19:31 AM SGT
Local ID                      5bdf10a8-8134-4bc4-ba0c-fd5717ad0b3f
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1277255971.165:24787): avc:  denied  { execmem } for  pid=3765 comm="freshclam" scontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tcontext=system_u:system_r:freshclam_t:s0-s0:c0.c1023 tclass=process

node=(removed) type=SYSCALL msg=audit(1277255971.165:24787): arch=40000003 syscall=192 success=no exit=-13 a0=0 a1=1000 a2=7 a3=22 items=0 ppid=3763 pid=3765 auid=0 uid=490 gid=477 euid=490 suid=490 fsuid=490 egid=477 sgid=477 fsgid=477 tty=(none) ses=2 comm="freshclam" exe="/usr/bin/freshclam" subj=system_u:system_r:freshclam_t:s0-s0:c0.c1023 key=(null)



Hash String generated from  catchall,freshclam,freshclam_t,freshclam_t,process,execmem
audit2allow suggests:

#============= freshclam_t ==============
allow freshclam_t self:process execmem;

Comment 1 Daniel Walsh 2010-06-25 19:00:11 UTC
Not an access that we want freshclam to have.

Comment 2 Daniel Walsh 2010-07-21 13:12:02 UTC
In F13 and Rawhide we have added a boolean for this.

unable_policy(`clamd_use_jit',`
	allow freshclam_t self:process execmem;
', `
	dontaudit freshclam_t self:process execmem;
')

Comment 3 Daniel Walsh 2010-07-21 13:13:46 UTC
Miroslav can you back port this fix to F12?

Comment 4 Miroslav Grepl 2010-08-05 12:02:21 UTC
Fixed in selinux-policy-3.6.32-120.fc12

Comment 5 Fedora Update System 2010-08-05 13:19:36 UTC
selinux-policy-3.6.32-120.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/selinux-policy-3.6.32-120.fc12

Comment 6 Fedora Update System 2010-08-05 23:23:42 UTC
selinux-policy-3.6.32-120.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/selinux-policy-3.6.32-120.fc12

Comment 7 Richard Shaw 2010-08-13 01:42:46 UTC
I've been seeing this in F13 as well... Did the selinux-policy in updates-testing for F12 get the equivalent in F13 updates-testing?

Comment 8 Miroslav Grepl 2010-08-13 06:14:22 UTC
(In reply to comment #7)
> I've been seeing this in F13 as well... Did the selinux-policy in
> updates-testing for F12 get the equivalent in F13 updates-testing?    

I also fixed it in selinux-policy-3.7.19-47.fc13. Thanks.

Comment 9 Richard Shaw 2010-08-14 03:41:35 UTC
Still don't see it.. Latest I can find even with updates-testing enabled is:

3.7.19-44.fc13

Is -47 a koji build?

Comment 10 Richard Shaw 2010-08-14 03:52:11 UTC
Never mind, it's there now.

Comment 11 Fedora Update System 2010-08-20 01:39:56 UTC
selinux-policy-3.6.32-120.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.