Bug 1035463

Summary: SELinux is preventing /usr/bin/clamscan from 'read' accesses on the file /var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb.
Product: [Fedora] Fedora Reporter: Elias Oliveira de Jesus <flama.es>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, flama.es, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b5928c0d1b7d87b02d2a2a5c2117c004da140ca8e7798f5bf98fbbf1ef8ca255
Fixed In Version: selinux-policy-3.12.1-74.15.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-13 05:04:09 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 Elias Oliveira de Jesus 2013-11-27 20:17:33 UTC
Description of problem:
SELinux is preventing /usr/bin/clamscan from 'read' accesses on the file /var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb.

*****  Plugin restorecon (92.2 confidence) suggests  *************************

If você deseja reparar este rótulo.
/var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb rótulo padrão deve ser var_lib_t.
Then você pode executar o restorecon.
Do
# /sbin/restorecon -v /var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb

*****  Plugin catchall_boolean (7.83 confidence) suggests  *******************

If você deseja allow antivirus to can scan system
Then you must tell SELinux about this by enabling the 'antivirus_can_scan_system' boolean.
You can read 'None' man page for more details.
Do
setsebool -P antivirus_can_scan_system 1

*****  Plugin catchall (1.41 confidence) suggests  ***************************

If você acredita que o clamscan deva ser permitido acesso de read em rogue.hdb file  por default.
Then você precisa reportar este como um erro.
Você pode gerar um módulo de política local para permitir este acesso.
Do
permitir este acesso agora executando:
# grep clamscan /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:cron_var_lib_t:s0
Target Objects                /var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb [
                              file ]
Source                        clamscan
Source Path                   /usr/bin/clamscan
Port                          <Desconhecido>
Host                          (removed)
Source RPM Packages           clamav-0.98-2.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.13.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.11.9-200.fc19.x86_64 #1 SMP Wed
                              Nov 20 21:22:24 UTC 2013 x86_64 x86_64
Alert Count                   21
First Seen                    2013-11-26 18:52:11 BRST
Last Seen                     2013-11-27 17:49:43 BRST
Local ID                      88fd03ba-5730-430f-afdf-15f00a2b7104

Raw Audit Messages
type=AVC msg=audit(1385581783.538:1037): avc:  denied  { read } for  pid=20354 comm="clamscan" name="rogue.hdb" dev="dm-0" ino=657088 scontext=system_u:system_r:antivirus_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_var_lib_t:s0 tclass=file


type=AVC msg=audit(1385581783.538:1037): avc:  denied  { open } for  pid=20354 comm="clamscan" path="/var/lib/clamav-unofficial-sigs/ss-dbs/rogue.hdb" dev="dm-0" ino=657088 scontext=system_u:system_r:antivirus_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_var_lib_t:s0 tclass=file


type=SYSCALL msg=audit(1385581783.538:1037): arch=x86_64 syscall=open success=yes exit=ESRCH a0=a6d300 a1=0 a2=1b6 a3=8 items=0 ppid=20278 pid=20354 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=55 tty=(none) comm=clamscan exe=/usr/bin/clamscan subj=system_u:system_r:antivirus_t:s0-s0:c0.c1023 key=(null)

Hash: clamscan,antivirus_t,cron_var_lib_t,file,read

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.9-200.fc19.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-12-03 11:46:55 UTC
Did you add this labeling? 

Try to execute

# chcon -R -t antivirus_db_t /var/lib/clamav-unofficial-sigs

Comment 2 Miroslav Grepl 2013-12-03 11:48:22 UTC
commit 24d7bfa3527e8208f45e3e48b81bb4b6d1c49d93
Author: Miroslav Grepl <mgrepl>
Date:   Tue Dec 3 12:48:08 2013 +0100

    Add antivirus_db_t labeling for /var/lib/clamav-unofficial-sigs

Comment 3 Fedora Update System 2013-12-11 13:28:13 UTC
selinux-policy-3.12.1-74.15.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/selinux-policy-3.12.1-74.15.fc19

Comment 4 Fedora Update System 2013-12-12 02:59:46 UTC
Package selinux-policy-3.12.1-74.15.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.12.1-74.15.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23231/selinux-policy-3.12.1-74.15.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-12-13 05:04:09 UTC
selinux-policy-3.12.1-74.15.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Red Hat Bugzilla 2023-09-14 01:54:32 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days