RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 979421 - SELinux complains about execution of bash related to 7z and amavisd-new
Summary: SELinux complains about execution of bash related to 7z and amavisd-new
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-28 13:37 UTC by Robert Scheck
Modified: 2018-12-03 19:13 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.7.19-210.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 10:31:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1598 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-11-20 21:39:24 UTC

Description Robert Scheck 2013-06-28 13:37:29 UTC
Description of problem:
Jun 28 09:19:05 mail amavis[17479]: (13827-03) (!)run_command: child process [17479]: run_command: failed to exec /usr/bin/7za l -slt -w/var/spool/amavisd/tmp/amavis-20130628T090439-13827-vr9AqQAx/parts -- /var/spool/amavisd/tmp/amavis-20130628T090439-13827-vr9AqQAx/parts/p002: 13 at /usr/sbin/amavisd line 4062.
Jun 28 09:19:05 mail amavis[13827]: (13827-03) (!)Decoding of p002 (Zip archive data, at least v2.0 to extract) failed, leaving it unpacked: do_7zip: can't get a list of archive members: exit 6;  at (eval 117) line 781.

vs.

type=AVC msg=audit(1372104217.612:18445): avc:  denied  { execute } for  pid=20234 comm="amavisd" name="bash" dev=sda2 ino=14680108 scontext=system_u:system_r:amavis_t:s0 tcontext=system_u:object_r:shell_exec_t:s0 tclass=file
type=SYSCALL msg=audit(1372104217.612:18445): arch=x86_64 syscall=execve success=no exit=EACCES a0=5d1ef60 a1=4c94470 a2=735bfa0 a3=8 items=0 ppid=18807 pid=20234 auid=0 uid=497 gid=497 euid=497 suid=497 fsuid=497 egid=497 sgid=497 fsgid=497 tty=(none) ses=1305 comm=amavisd exe=/usr/bin/perl subj=system_u:system_r:amavis_t:s0 key=(null)

I actually do not get if the SELinux issue happens because 7zip does have an
issue with the archive file or if SELinux is forbidding 7zip activities and
thus it is failing?! Any ideas by the SELinux guys?

-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /bin/gzip
-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /usr/bin/7z
-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /usr/bin/7za
-rwxr-xr-x. root root system_u:object_r:bin_t:s0       /usr/bin/unzip

To be honest, I do not get the difference to regular gzip or similar.

Version-Release number of selected component (if applicable):
amavisd-new-2.8.0-4.el6.noarch
selinux-policy-targeted-3.7.19-195.el6_4.10.noarch 

How reproducible:
Everytime, see above and below.

Actual results:
SELinux complains about execution of bash related to 7z and amavisd-new.

Expected results:
No SELinux complains about execution of bash related to 7z and amavisd-new.

Comment 1 Robert Scheck 2013-06-28 13:41:07 UTC
Cross-filed case 00897763 on the Red Hat customer portal.

Comment 3 Daniel Walsh 2013-06-28 18:56:15 UTC
This is blocking the executing of the shell (bash).

It should be allowed.

We have

corecmd_exec_bin(amavis_t)
corecmd_exec_shell(amavis_t

In Fedora.

Comment 4 Robert Scheck 2013-07-09 11:40:03 UTC
Does this mean, this will get included for next policy update in RHEL?

Comment 5 Miroslav Grepl 2013-07-10 08:49:58 UTC
Yes, it does.

Comment 8 errata-xmlrpc 2013-11-21 10:31:59 UTC
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-1598.html


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