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 1971228 - SELinux is preventing /usr/sbin/unix_chkpwd from getattr access on the filesystem /proc
Summary: SELinux is preventing /usr/sbin/unix_chkpwd from getattr access on the filesy...
Keywords:
Status: CLOSED DUPLICATE of bug 1967125
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: 8.5
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1969483
TreeView+ depends on / blocked
 
Reported: 2021-06-13 04:03 UTC by Jimmie Mayfield
Modified: 2021-10-07 18:54 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-16 16:47:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jimmie Mayfield 2021-06-13 04:03:10 UTC
Description of problem:
On CentOS 8 Stream, SELinux 'unix_chkpwd' triggers an SELinux violation

sealert -l f26706db-2c08-4ee4-b0cf-be5534e68597
SELinux is preventing /usr/sbin/unix_chkpwd from getattr access on the filesystem /proc.
...
Raw Audit Messages
type=AVC msg=audit(1623556801.295:290): avc:  denied  { getattr } for  pid=10311 comm="unix_chkpwd" name="/" dev="proc" ino=1 scontext=system_u:system_r:chkpwd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_t:s0 tclass=filesystem permissive=0
...
type=SYSCALL msg=audit(1623556801.295:290): arch=x86_64 syscall=fstatfs success=no exit=EACCES a0=3 a1=7fff617eba70 a2=0 a3=0 items=0 ppid=10301 pid=10311 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)



Version-Release number of selected component (if applicable):
OS: CentOS 8 Stream with the most recent updates
pam-1.3.1-15.el8.x86_64
selinux-policy-3.14.3-68.el8.noarch

As far as SELinux policies and PAM configuration are concerned, this machine appears to be using the package default configurations.  No local customizations have been made to SELinux or PAM config.

How reproducible:
This occurs every time someone logs into the machine


Steps to Reproduce:
1. Log into the machine 
2.
3.

Actual results:
Successful login is accompanied by a series of messages written to the journal indicating unix_chkpwd has triggered an SELinux action

Expected results:
Near as I can tell, this machine has no customized local policies and is using the default PAM config files.  I would expect a default installation to not trigger SELinux actions.

Additional info:

Comment 1 Steven Rosenberg 2021-06-13 22:26:11 UTC
I can confirm this issue in CentOS Stream 8.

Comment 2 Zdenek Pytela 2021-06-14 08:14:01 UTC
This commit needs to be backported:
commit 0b26432144f0b6f2140b974b9c508d991286bfa4
Author: Zdenek Pytela <zpytela>
Date:   Mon Jan 4 19:50:49 2021 +0100

    Allow domain stat /proc filesystem

    Resolves: rhbz#1892401

Comment 3 Phil Baker 2021-06-14 09:03:44 UTC
I also can confirm this issue on my installation of CentOS Stream 8.

Comment 4 Milos Malik 2021-06-16 16:33:36 UTC
I believe this bug is a duplicate of BZ#1967125.

Comment 5 Milos Malik 2021-06-16 16:36:48 UTC
What version of libcap-ng package is installed on the machine?

# rpm -qa libcap\*

Thank you.

Comment 6 Jimmie Mayfield 2021-06-16 16:38:46 UTC
> rpm -qa libpcap\*
libpcap-1.9.1-5.el8.x86_64

Comment 7 Zdenek Pytela 2021-06-16 16:47:40 UTC
Thank you for the confirmation, resolution for this bz should be a part of RHEL 8.5, it is a (non-obvious) dup of bz#1967125.

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

Comment 8 Phil Baker 2021-06-16 18:50:20 UTC
On my fully-patched CentOS Stream 8 virtual machine: 

rpm -qa libcap\*

libcap-ng-0.7.11-1.el8.x86_64
libcap-2.26-4.el8.x86_64


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