Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 854610

Summary: AVCs when running mailman test with disabled unconfined and unlabelednet
Product: Red Hat Enterprise Linux 6 Reporter: Michal Trunecka <mtruneck>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Michal Trunecka <mtruneck>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: dwalsh, ebenes, mmalik, mtruneck
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-07 11:04:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
AVCs caused by the test script
none
AVCs with paths none

Description Michal Trunecka 2012-09-05 12:34:37 UTC
Created attachment 610017 [details]
AVCs caused by the test script

Description of problem:
When unconfined and unlabelednet modules are disabled, running automated test of mailman causes AVCs, which are attached in file.


Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-155.el6_3.noarch
selinux-policy-targeted-3.7.19-155.el6_3.noarch
mailman-2.1.12-17.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. semodule -d unconfined; semodule -d unlabelednet
2. Run following automated test 
/CoreOS/selinux-policy/Regression/bz804020-mailman-and-similar

Actual results:
AVCs

Expected results:
No AVCs

Comment 1 Michal Trunecka 2012-09-05 12:41:39 UTC
I forgot to mention that nothing went wrong during the test, only AVCs showed up.

Comment 3 Miroslav Grepl 2012-09-06 05:12:28 UTC
Michal,
what does this test do?

Could I get an access on this machine?

Comment 4 Michal Trunecka 2012-09-06 06:58:13 UTC
The test involves setting up a new mailing list and then starting and restarting mailman service:

EMAIL_DOMAIN=$HOSTNAME
if echo ${EMAIL_DOMAIN} | grep "localhost" ; then
        EMAIL_DOMAIN="127.0.0.1"
fi
echo | /usr/lib/mailman/bin/newlist mailman root@${EMAIL_DOMAIN} S3kr3d${RANDOM}

service mailman start
service mailman restart


I tested it on my local virtual machine, but I can set up the environment on some beaker machine once it is available.

Comment 5 Daniel Walsh 2012-09-06 20:52:42 UTC
This looks like a labeling problem since you have mailman running as initrc_t.  ALso the python code should be compiled before running it within a service.

Comment 6 Miroslav Grepl 2012-09-11 06:24:31 UTC
Michal,
what does

# ps -efZ |grep initrc

Comment 7 Michal Trunecka 2012-09-11 06:56:27 UTC
ps -efZ |grep initrc   does not show anything. I looked into the /etc/init.d/mailman script and the AVCs are caused probably by following two things in this script:

Installing crond script:
    SRC_CRON_SCRIPT=$MAILMANHOME/cron/crontab.in
    DST_CRON_SCRIPT=/etc/cron.d/mailman
    install -m644 -o root -g root $SRC_CRON_SCRIPT $DST_CRON_SCRIPT

Running mailman-update-cfg.
[root@dhcp-25-115 bz804020-mailman-and-similar]# ls -Z `which mailman-update-cfg`
-rwxr-xr-x. root root system_u:object_r:bin_t:s0     /usr/bin/mailman-update-cfg

Comment 8 Michal Trunecka 2012-09-11 06:57:21 UTC
Created attachment 611669 [details]
AVCs with paths

I'm also attaching a file with the AVCs with full path names.

Comment 9 Miroslav Grepl 2012-09-13 08:55:11 UTC
(In reply to comment #7)
> ps -efZ |grep initrc   does not show anything. I looked into the
> /etc/init.d/mailman script and the AVCs are caused probably by following two
> things in this script:
> 
> Installing crond script:
>     SRC_CRON_SCRIPT=$MAILMANHOME/cron/crontab.in
>     DST_CRON_SCRIPT=/etc/cron.d/mailman
>     install -m644 -o root -g root $SRC_CRON_SCRIPT $DST_CRON_SCRIPT
> 
> Running mailman-update-cfg.
> [root@dhcp-25-115 bz804020-mailman-and-similar]# ls -Z `which
> mailman-update-cfg`
> -rwxr-xr-x. root root system_u:object_r:bin_t:s0    
> /usr/bin/mailman-update-cfg

Yes, it will be our problem here.

Comment 10 RHEL Program Management 2012-12-14 08:17:48 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 12 Miroslav Grepl 2013-07-17 13:50:03 UTC
Michal,
does the problem still exist?

Comment 13 Michal Trunecka 2013-07-24 12:56:49 UTC
No, this bug seems to be fixed in the current policy:
selinux-policy-3.7.19-209.el6.noarch