Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1367254 - clamav needs a bunch'o selinux AVC tweaks
Summary: clamav needs a bunch'o selinux AVC tweaks
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 24
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-16 04:19 UTC by Doug Maxey
Modified: 2017-08-08 16:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 16:33:59 UTC


Attachments (Terms of Use)

Description Doug Maxey 2016-08-16 04:19:34 UTC
Description of problem:

clamav as shipped in fedora 24 cannot run due to missing selinux perms/transitions.

Version-Release number of selected component (if applicable):
# rpm -qa selinux\*
selinux-policy-3.13.1-191.10.fc24.noarch
selinux-policy-devel-3.13.1-191.10.fc24.noarch
selinux-policy-targeted-3.13.1-191.10.fc24.noarch

# rpm -qa clam\* |sort
clamav-0.99.2-1.fc24.x86_64
clamav-data-0.99.2-1.fc24.noarch
clamav-filesystem-0.99.2-1.fc24.noarch
clamav-lib-0.99.2-1.fc24.x86_64
clamav-milter-0.99.2-1.fc24.x86_64
clamav-milter-systemd-0.99.2-1.fc24.noarch
clamav-scanner-0.99.2-1.fc24.noarch
clamav-scanner-systemd-0.99.2-1.fc24.noarch
clamav-server-0.99.2-1.fc24.x86_64
clamav-server-systemd-0.99.2-1.fc24.noarch
clamav-unofficial-sigs-3.7.2-2.fc24.noarch
clamav-update-0.99.2-1.fc24.x86_64

How reproducible:

100%

Steps to Reproduce:
1. install clamav parts, including milter

Actual results:

Had to work my way through several AVCs, eventually got it working.

Additional info:
==> my-clamavmilter.te <==

module my-clamavmilter 1.4;

require {
	type antivirus_t;
	type antivirus_var_run_t;
	type init_t;
	type antivirus_log_t;
	class file { append getattr open lock write };
	class sock_file write;
	class unix_stream_socket connectto;
}

#============= init_t ==============
allow init_t antivirus_log_t:file { append getattr open lock write };
allow init_t antivirus_var_run_t:sock_file write;
allow init_t antivirus_t:unix_stream_socket connectto;

==> my-clamd.te <==

module my-clamd 1.0;

require {
	type var_log_t;
	type init_tmp_t;
	type antivirus_t;
	class file { open write };
}

#============= antivirus_t ==============
allow antivirus_t init_tmp_t:file write;

#!!!! This avc is allowed in the current policy
allow antivirus_t var_log_t:file open;

==> my-sendmail.te <==

module my-sendmail 1.0;

require {
	type sendmail_t;
	type init_t;
	class unix_stream_socket connectto;
}

#============= sendmail_t ==============

#!!!! The file '/run/clamav-milter/clamav-milter.socket' is mislabeled on your system.  
#!!!! Fix with $ restorecon -R -v /run/clamav-milter/clamav-milter.socket
allow sendmail_t init_t:unix_stream_socket connectto;

==> my-vmilter.te <==

module my-vmilter 1.0;

require {
	type antivirus_exec_t;
	type init_t;
	class file execute_no_trans;
}

#============= init_t ==============
allow init_t antivirus_exec_t:file execute_no_trans;
#

Comment 1 Fedora End Of Life 2017-07-25 22:27:09 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-08-08 16:33:59 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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