Bug 1178992

Summary: SELinux is preventing /usr/bin/freshclam from 'open' accesses on the file /proc/filesystems.
Product: [Fedora] Fedora Reporter: Raman Gupta <rocketraman>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:8fd4cfd4f6e2dadc92e2bed4e716408828c588579d1bc8c01e1d0c8ad8d3d4f1
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-06 10:55:35 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 Raman Gupta 2015-01-05 20:37:56 UTC
Description of problem:
Run via cron by freshclam (the clamav database update). The antivirus_can_scan_system does not apply because freshclam is not doing an anti-virus scan. I think the Plugin that reports this solution with such high confidence should not consider freshclam within the antivirus scanning category.

Not sure why freshclam needs access to /proc/filesystems.
SELinux is preventing /usr/bin/freshclam from 'open' accesses on the file /proc/filesystems.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow antivirus programs to read non security files on a system
Then you must tell SELinux about this by enabling the 'antivirus_can_scan_system' boolean.
You can read 'antivirus_selinux' man page for more details.
Do
setsebool -P antivirus_can_scan_system 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that freshclam should be allowed open access on the filesystems file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep freshclam /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:antivirus_t:s0-s0:c0.c1023
Target Context                system_u:object_r:proc_t:s0
Target Objects                /proc/filesystems [ file ]
Source                        freshclam
Source Path                   /usr/bin/freshclam
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           clamav-update-0.98.5-1.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-103.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.7-300.fc21.x86_64 #1 SMP Wed
                              Dec 17 03:08:44 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2015-01-05 15:25:41 EST
Last Seen                     2015-01-05 15:25:41 EST
Local ID                      821dd947-3077-4a31-9690-0516a11ad2ff

Raw Audit Messages
type=AVC msg=audit(1420489541.939:2092): avc:  denied  { open } for  pid=15511 comm="freshclam" path="/proc/filesystems" dev="proc" ino=4026532041 scontext=system_u:system_r:antivirus_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1420489541.939:2092): arch=x86_64 syscall=open success=no exit=EACCES a0=3cb1bc37d8 a1=0 a2=1b6 a3=240 items=0 ppid=15509 pid=15511 auid=0 uid=988 gid=980 euid=988 suid=988 fsuid=988 egid=980 sgid=980 fsgid=980 tty=(none) ses=29 comm=freshclam exe=/usr/bin/freshclam subj=system_u:system_r:antivirus_t:s0-s0:c0.c1023 key=(null)

Hash: freshclam,antivirus_t,proc_t,file,open

Version-Release number of selected component:
selinux-policy-3.13.1-103.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.7-300.fc21.x86_64
type:           libreport

Comment 1 Raman Gupta 2015-01-05 21:09:00 UTC
Could be a dupe of #1172774 but the avc was different, so I'm not sure.

Comment 2 Miroslav Grepl 2015-01-06 10:55:35 UTC

*** This bug has been marked as a duplicate of bug 1172774 ***