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 2054657 - SELinux prevents the chage process from executing the sss_cache program
Summary: SELinux prevents the chage process from executing the sss_cache program
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 9.0
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 2057261 2057297 (view as bug list)
Depends On:
Blocks: 2057261
TreeView+ depends on / blocked
 
Reported: 2022-02-15 12:47 UTC by Filip Dvorak
Modified: 2022-05-18 09:25 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-34.1.27-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2054718 (view as bug list)
Environment:
Last Closed: 2022-05-17 15:50:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-112328 0 None None None 2022-02-15 12:55:14 UTC
Red Hat Product Errata RHBA-2022:3918 0 None None None 2022-05-17 15:50:36 UTC

Description Filip Dvorak 2022-02-15 12:47:00 UTC
Description of problem:
there is a AVC message when the command chage is used.

Version-Release number of selected component (if applicable):
selinux-policy-34.1.24-1.el9.noarch
RHEL9

Steps to Reproduce:
1.create a user with some passwoed and use "chage -m 1 -M 90 alice"

Actual results:

SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Memory protection checking:     actual (secure)
Max kernel policy version:      33
selinux-policy-34.1.24-1.el9.noarch
----
time->Mon Feb 14 11:05:32 2022
type=PROCTITLE msg=audit(1644854732.203:3013): proctitle=6368616765002D2D6C6173746461790031002D2D6D617864617973003100627A373533373634
type=SYSCALL msg=audit(1644854732.203:3013): arch=c000003e syscall=59 success=no exit=-13 a0=55a24bba9d8a a1=7ffc08331630 a2=7ffc08331628 a3=7fd01cab2008 items=0 ppid=102517 pid=102520 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4 comm="chage" exe="/usr/bin/chage" subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1644854732.203:3013): avc:  denied  { execute } for  pid=102520 comm="chage" name="sss_cache" dev="vda4" ino=4596 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=0


Expected results:
No AVC message.

Comment 2 Milos Malik 2022-02-15 14:21:17 UTC
Caught in enforcing mode:

# chage -m 1 -M 90 alice
chage: cannot execute /usr/sbin/sss_cache: Permission denied
#

----
type=PROCTITLE msg=audit(02/15/2022 09:18:24.688:429) : proctitle=chage -m 1 -M 90 alice 
type=PATH msg=audit(02/15/2022 09:18:24.688:429) : item=0 name=/usr/sbin/sss_cache inode=6802998 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(02/15/2022 09:18:24.688:429) : cwd=/root 
type=SYSCALL msg=audit(02/15/2022 09:18:24.688:429) : arch=x86_64 syscall=execve success=no exit=EACCES(Permission denied) a0=0x56158fb26d8a a1=0x7fff96782950 a2=0x7fff96782948 a3=0x7f1d57889008 items=1 ppid=5674 pid=5677 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=4 comm=chage exe=/usr/bin/chage subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(02/15/2022 09:18:24.688:429) : avc:  denied  { execute } for  pid=5677 comm=chage name=sss_cache dev="vda1" ino=6802998 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=0 
----

Caught in permissive mode:

# chage -m 1 -M 90 alice
#

----
type=PROCTITLE msg=audit(02/15/2022 09:19:34.552:435) : proctitle=sss_cache -UG 
type=PATH msg=audit(02/15/2022 09:19:34.552:435) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=6413786 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=PATH msg=audit(02/15/2022 09:19:34.552:435) : item=0 name=/usr/sbin/sss_cache inode=6802998 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:sssd_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(02/15/2022 09:19:34.552:435) : cwd=/root 
type=EXECVE msg=audit(02/15/2022 09:19:34.552:435) : argc=2 a0=sss_cache a1=-UG 
type=SYSCALL msg=audit(02/15/2022 09:19:34.552:435) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x555f0b935d8a a1=0x7ffc8a1d36d0 a2=0x7ffc8a1d36c8 a3=0x7f29cfb02008 items=2 ppid=5681 pid=5684 auid=root uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=pts0 ses=4 comm=sss_cache exe=/usr/sbin/sss_cache subj=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 key=(null) 
type=AVC msg=audit(02/15/2022 09:19:34.552:435) : avc:  denied  { map } for  pid=5684 comm=sss_cache path=/usr/sbin/sss_cache dev="vda1" ino=6802998 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=1 
type=AVC msg=audit(02/15/2022 09:19:34.552:435) : avc:  denied  { execute_no_trans } for  pid=5684 comm=chage path=/usr/sbin/sss_cache dev="vda1" ino=6802998 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=1 
type=AVC msg=audit(02/15/2022 09:19:34.552:435) : avc:  denied  { read open } for  pid=5684 comm=chage path=/usr/sbin/sss_cache dev="vda1" ino=6802998 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=1 
type=AVC msg=audit(02/15/2022 09:19:34.552:435) : avc:  denied  { execute } for  pid=5684 comm=chage name=sss_cache dev="vda1" ino=6802998 scontext=unconfined_u:unconfined_r:passwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sssd_exec_t:s0 tclass=file permissive=1 
----

Comment 4 Zdenek Pytela 2022-02-16 19:57:28 UTC
To backport:
commit f540263f5ffcf315b970ca6428b2f04ff5c13f59
Author: Zdenek Pytela <zpytela>
Date:   Wed Feb 16 16:57:08 2022 +0100

    Allow chage domtrans to sssd

Comment 12 Cédric Jeanneret 2022-02-23 07:44:17 UTC
*** Bug 2057297 has been marked as a duplicate of this bug. ***

Comment 14 errata-xmlrpc 2022-05-17 15:50:20 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 (new packages: selinux-policy), 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:3918

Comment 15 Sandeep Yadav 2022-05-18 09:25:39 UTC
*** Bug 2057261 has been marked as a duplicate of this bug. ***


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