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 1870300

Summary: SELinux prevents saslauthd from creating a kerberos reply cache file
Product: Red Hat Enterprise Linux 8 Reporter: Kaleem <ksiddiqu>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: fcami, lvrabec, mmalik, pasik, plautrba, rcritten, ssekidde
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 01:57:16 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
test run with output. none

Description Kaleem 2020-08-19 17:26:49 UTC
Created attachment 1711918 [details]
test run with output.

Description of problem:

Following two set of avc denial seen during execution of ipa epn tests .

For tests test_EPN_authenticated, test_EPN_template , test_mailtest, test_EPN_starttls , test_EPN_ssl

type=AVC msg=audit(1597851507.667:2293): avc:  denied  { create } for  pid=29391 comm="saslauthd" name="krb5_0.rcache2" scontext=system_u:system_r:saslauthd_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=file permissive=0

For tests test_EPN_starttls, test_EPN_ssl following is also seen

type=AVC msg=audit(1597851527.271:2658): avc:  denied  { fowner } for  pid=33471 comm="certmonger" capability=3  scontext=system_u:system_r:certmonger_t:s0 tcontext=system_u:system_r:certmonger_t:s0 tclass=capability permissive=0


Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-52.el8.noarch

How reproducible:
Always

Steps to Reproduce:
1. Running the ipa epn tests


Actual results:
5 out of 21 tests failed because of avc denial mentioned above

Expected results:
no avc denial should be there.

Additional info:
(1)All tests pass in permissive mode
(2)Please find the attached test run with output (reported.html)

Comment 1 François Cami 2020-08-20 00:50:26 UTC
These are two different AVCs.

The one that is blocking the tests is most probably the saslauthd one and is not part of FreeIPA.
For reference, the test lives at:
https://github.com/freeipa/freeipa/blob/master/ipatests/test_integration/test_epn.py

This AVC was previously reported:
https://bugzilla.redhat.com/show_bug.cgi?id=1857253

Kaleem, could you launch the test again with the packages from the errata listed at:
https://bugzilla.redhat.com/show_bug.cgi?id=1848953
https://errata.devel.redhat.com/advisory/55059


The second AVC is certmonger's and I could not find a match. 
Rob, is that one known to you?

Comment 2 Rob Crittenden 2020-08-20 01:04:53 UTC
The certmonger AVC is new. I think it is related to using the -O <owner> option in the ipa-getcert call. The resulting cert/key will be chown'd to the user.

Comment 3 François Cami 2020-08-20 01:17:47 UTC
Kaleem, could you please file a separate bug for the certmonger AVC?

Comment 4 Rob Crittenden 2020-08-20 13:04:39 UTC
I filed https://bugzilla.redhat.com/show_bug.cgi?id=1870596

Comment 5 François Cami 2020-08-20 13:09:17 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1848953#c45 is now VERIFIED.
Kaleem, would you be able to launch the test again with the new packages so that we check everything works as expected?

Comment 6 Kaleem 2020-08-20 14:20:32 UTC
(In reply to François Cami from comment #5)
> https://bugzilla.redhat.com/show_bug.cgi?id=1848953#c45 is now VERIFIED.
> Kaleem, would you be able to launch the test again with the new packages so
> that we check everything works as expected?

Tests were executed with mentioned selinux-policy version and these are not same avc seen as in there, yes target is same.
bug https://bugzilla.redhat.com/show_bug.cgi?id=1848953 was for ssh/smbd comm but here we it for saslauthd as well which is not fixed.

Comment 7 François Cami 2020-08-20 14:32:02 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1857253 was identical to the current issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1857253 was closed as DUPLICATE of https://bugzilla.redhat.com/show_bug.cgi?id=1848953
This is why I referenced https://bugzilla.redhat.com/show_bug.cgi?id=1848953 as it is the only bug of the two to have the errata.

Comment 9 Zdenek Pytela 2020-08-20 14:58:04 UTC
Note bz#1857253 is not identical - it was about writing to an existing reply cache; in this bz, the file is to be created instead.

Comment 20 errata-xmlrpc 2020-11-04 01:57:16 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 (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4528