Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
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 2117199 - RHEL8.7 AVC during ipa trust-add
Summary: RHEL8.7 AVC during ipa trust-add
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.7
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.7
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-10 10:00 UTC by anuja
Modified: 2022-11-08 12:22 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.14.3-107.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 2114902
Environment:
Last Closed: 2022-11-08 10:44:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 1349 0 None open Allow smbd_t process noatsecure permission for winbind_rpcd_t 2022-08-25 15:34:24 UTC
Red Hat Bugzilla 2114902 0 medium CLOSED selinux-policy AVC denials during ipa trust-add 2023-02-10 18:05:55 UTC
Red Hat Issue Tracker RHELPLAN-130815 0 None None None 2022-08-10 10:04:24 UTC
Red Hat Product Errata RHBA-2022:7691 0 None None None 2022-11-08 10:44:46 UTC

Description anuja 2022-08-10 10:00:13 UTC
Description of problem:
AVC during ipa trust-add

Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-105.el8.noarch
ipa-server-4.9.10-5.module+el8.7.0+16195+c459c321.x86_64

How reproducible:
Always

Steps to Reproduce:
1. install IPA server with 
ipa-server-install -n ipa.test -r IPA.TEST -p Secret.123 -a Secret.123 --domain-level=1 -U --setup-dns --auto-forwarders --auto-reverse
2. configure as trust domain controller with
ipa-adtrust-install -U --enable-compat --netbios-name IPA -a Secret.123 --add-sids
3. obtain an admin  ticket with
kinit admin
4. systemctl restart smb
4. add a trust with AD:
ipa trust-add --type ad ad.test --admin Administrator --password
5. check the credential cache, it contains a ticket for cifs/master.ipa.test instead of admin

Actual results:
[root@master ~]# klist 
Ticket cache: KCM:0
Default principal: cifs/master.ipa.test


Expected results:
[root@master ~]# klist 
Ticket cache: KCM:0
Default principal: admin

Comment 1 Zdenek Pytela 2022-08-10 10:09:17 UTC
Can you please attach

  # ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today

and audit.log?

Comment 4 Zdenek Pytela 2022-08-19 15:42:20 UTC
Hello,

The reproducing steps do not work completely for me, I keep getting an error in the last step:

# systemctl restart smb
# ipa trust-add --type ad ad.test --admin Administrator --password
Active Directory domain administrator's password: 
ipa: ERROR: Cannot find specified domain or server name
# klist
Ticket cache: KCM:0
Default principal: cifs/hp-z210-01.domain.com

Is there anything else needed to have configured?
Is any particular ipa version required and where we can get it?

Can you also try the following SELinux module if it makes any change?

  # cat local_rpcdlsad_netadmin.cil
(allow winbind_rpcd_t winbind_rpcd_t (capability (net_admin)))
  # semodule -i local_rpcdlsad_netadmin.cil
<then reproduce again>

Comment 7 Zdenek Pytela 2022-08-25 10:00:20 UTC
The install command on a current RHEL 8.7 system fails:

  [16/29]: configure certmonger for renewals
  [error] CalledProcessError: CalledProcessError(Command ['/bin/systemctl', 'start', 'certmonger.service'] returned non-zero exit status 1: 'Job for certmonger.service failed because the control process exited with error code.\nSee "systemctl status certmonger.service" and "journalctl -xe" for details.\n')
CalledProcessError(Command ['/bin/systemctl', 'start', 'certmonger.service'] returned non-zero exit status 1: 'Job for certmonger.service failed because the control process exited with error code.\nSee "systemctl status certmonger.service" and "journalctl -xe" for details.\n')
The ipa-server-install command failed. See /var/log/ipaserver-install.log for more informatio

Is it okay to postpone this bz to the next release?
Can you provide me a configured system?

Possibly one of these modules can resolve the issue:
(allow httpd_t httpd_t (capability (net_admin)))
-or-
(allow chkpwd_t user_devpts_t (chr_file (read write)))

Comment 18 errata-xmlrpc 2022-11-08 10:44:31 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-2022:7691


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