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 1532001 - SELinux is preventing /usr/sbin/unix_chkpwd from using the dac_read_search capability
Summary: SELinux is preventing /usr/sbin/unix_chkpwd from using the dac_read_search ca...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-07 10:32 UTC by srakitnican
Modified: 2018-01-08 09:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-08 09:31:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1451379 0 unspecified CLOSED SELinux is preventing unix_chkpwd from using the 'dac_read_search' capabilities. 2021-02-22 00:41:40 UTC

Internal Links: 1451379

Description srakitnican 2018-01-07 10:32:23 UTC
SELinux is preventing /usr/sbin/unix_chkpwd from using the dac_read_search capability.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that unix_chkpwd should have the dac_read_search capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'unix_chkpwd' --raw | audit2allow -M my-unixchkpwd
# semodule -i my-unixchkpwd.pp


Additional Information:
Source Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:chkpwd_t:s0-s0:c0.c1023
Target Objects                /etc/shadow [ capability ]
Source                        unix_chkpwd
Source Path                   /usr/sbin/unix_chkpwd
Port                          <Unknown>
Host                          crnigrom
Source RPM Packages           pam-1.1.8-18.el7.x86_64
Target RPM Packages           setup-2.8.71-7.el7.noarch
Policy RPM                    selinux-policy-3.13.1-166.el7_4.7.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     crnigrom
Platform                      Linux crnigrom 4.14.6-1.el7.elrepo.x86_64 #1 SMP
                              Thu Dec 14 09:52:47 EST 2017 x86_64 x86_64
Alert Count                   19969
First Seen                    2017-10-27 19:40:01 CEST
Last Seen                     2018-01-07 11:20:01 CET
Local ID                      33366ddd-db20-4ede-a585-034516071bad

Raw Audit Messages
type=AVC msg=audit(1515320401.605:105916): avc:  denied  { dac_read_search } for  pid=1681 comm="unix_chkpwd" capability=2  scontext=system_
u:system_r:chkpwd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tclass=capability permissive=0


type=SYSCALL msg=audit(1515320401.605:105916): arch=x86_64 syscall=open success=yes exit=ESRCH a0=7ff57a28c453 a1=80000 a2=1b6 a3=24 items=1
 ppid=1680 pid=1681 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=unix_chkpwd exe=/
usr/sbin/unix_chkpwd subj=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 key=(null)

type=CWD msg=audit(1515320401.605:105916): cwd=/

type=PATH msg=audit(1515320401.605:105916): item=0 name=/etc/shadow inode=2097668 dev=08:02 mode=0100000 ouid=0 ogid=0 rdev=00:00 obj=system
_u:object_r:shadow_t:s0 nametype=NORMAL cap_fp=0000000000000000 cap_fi=0000000000000000 cap_fe=0 cap_fver=0

Hash: unix_chkpwd,chkpwd_t,chkpwd_t,capability,dac_read_search

Comment 2 Lukas Vrabec 2018-01-08 09:31:16 UTC
Hello, 

This will be fixed in next minor release. 

Thanks,
Lukas.

Comment 3 Milos Malik 2018-01-08 09:36:24 UTC
As soon as RHEL-7.5 becomes GA.


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