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 2057297

Summary: useradd causes avc: denied { execute } for pid=57884 comm="chpasswd" name="sss_cache"
Product: Red Hat Enterprise Linux 9 Reporter: Cédric Jeanneret <cjeanner>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Milos Malik <mmalik>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 9.0CC: lvrabec, mmalik, ssekidde
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-02-23 07:44:17 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:
Bug Depends On:    
Bug Blocks: 2057261    

Description Cédric Jeanneret 2022-02-23 07:14:35 UTC
This bug was initially created as a copy of Bug #2050952

I am copying this bug because: 
The initial BZ was reported against Fedora-35, but this issue also hits EL9, for instance raised here:
https://bugzilla.redhat.com/show_bug.cgi?id=2057261

So it's probably a matter of backporting the fix from Fedora.

Thank you!


Description of problem: In today's cockpit Fedora 35 test image refresh [1], there is a new SELinux rejection:

    avc:  denied  { execute } for  pid=57884 comm="chpasswd" name="sss_cache" dev="vda5" ino=39569 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=0


Full journal at [2]. This seems to happen when running `useradd -G libvirt test_user`.


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

There are a lot of package updates since last week [3], but the relevant ones are:

   selinux-policy (35.11-1.fc35 -> 35.13-1.fc35)
   sssd (2.6.1-1.fc35 -> 2.6.3-1.fc35)

At first sight, running "sss_cache" from chpasswd seems plausible -- but of course, if it isn't, please reassign to sssd.

Thanks!


[1] https://github.com/cockpit-project/bots/pull/2897
[2] https://logs.cockpit-project.org/logs/pull-2897-20220205-074019-32a8cfdc-fedora-35-firefox-cockpit-project-cockpit-machines/TestMachinesLifecycle-testLibvirt-fedora-35-127.0.0.2-2201-FAIL.log.gz
[3] https://logs.cockpit-project.org/logs/image-refresh-2897-20220205-065151/log

Comment 1 Milos Malik 2022-02-23 07:19:11 UTC
I believe this bug is a duplicate of BZ#2054657.

$ matchpathcon /usr/bin/chage
/usr/bin/chage	system_u:object_r:passwd_exec_t:s0
$ matchpathcon /usr/sbin/chpasswd 
/usr/sbin/chpasswd	system_u:object_r:passwd_exec_t:s0
$

Comment 2 Cédric Jeanneret 2022-02-23 07:44:17 UTC
Hey Milos,

I think you're perfectly right, lemme close this as duplicate then!

Thanks for the quick answer!

*** This bug has been marked as a duplicate of bug 2054657 ***