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 1870596 - fowner capability required by certmonger
Summary: fowner capability required by certmonger
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.3
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-20 13:04 UTC by Rob Crittenden
Modified: 2020-11-04 01:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:57:16 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4528 0 None None None 2020-11-04 01:57:27 UTC

Description Rob Crittenden 2020-08-20 13:04:24 UTC
Description of problem:

As part of one of the IPA integration tests (test_epn) certmonger is used to obtain an X.509 certificate for postfix.

It is requested with:

# ipa-getcert request -f /etc/pki/tls/certs/postfix.pem \
-k /etc/pki/tls/private/postfix.key \
-K smtp/`hostname` \
-D `hostname` \
-O postfix \
-o postfix \
-M 0640 \
-m 0600 \
-w

After obtaining the certificate certmonger will change the owner and group to postfix and set the file mode of the certificate and key.

This is resulting in the following AVC:

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

The chown is done first with: fchown(fd, uid, gid)

followed by the chmod: fchmod(fd, perms)

Version-Release number of selected component (if applicable):

selinux-policy-3.14.3-52.el8
certmonger-0.79.7-15.el8

Steps to Reproduce:
1. ipa-server-install
2. kinit admin
3. ipa service-add smtp/`hostname
4. the above ipa-getcert command

Comment 1 Zdenek Pytela 2020-08-20 14:01:27 UTC
Rob,

Could you please re-run the scenario with SELinux in permissive mode to gather all possible subsequent denials?

  # setenforce 0

Reading the description in bz#1870300, I see some tests fail. Do they cover some real scenario? Which RHEL release should the fix target?

Comment 24 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


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