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 2094155 - rhel9 avc denied with rm and dhclient-script
Summary: rhel9 avc denied with rm and dhclient-script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.1
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 9.1
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
: 2173479 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-07 02:22 UTC by Hekai Wang
Modified: 2023-02-27 16:06 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-34.1.35-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:13:52 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 1250 0 None open Allow dhclient manage pid files used by chronyd 2022-06-21 15:49:42 UTC
Red Hat Issue Tracker RHELPLAN-124414 0 None None None 2022-06-07 02:38:04 UTC
Red Hat Product Errata RHBA-2022:8283 0 None None None 2022-11-15 11:14:08 UTC

Description Hekai Wang 2022-06-07 02:22:39 UTC
Description of problem:
rhel9 avc denied with rm and dhclient-script

Version-Release number of selected component (if applicable):
[root@dell-per740-43 ~]# rpm -qa | grep selinux
libselinux-3.3-2.el9.x86_64
libselinux-utils-3.3-2.el9.x86_64
rpm-plugin-selinux-4.16.1.3-12.el9_0.x86_64
selinux-policy-34.1.32-1.el9.noarch
selinux-policy-targeted-34.1.32-1.el9.noarch
python3-libselinux-3.3-2.el9.x86_64
openvswitch-selinux-extra-policy-1.0-31.el9fdp.noarch
flatpak-selinux-1.12.7-1.el9.noarch
[root@dell-per740-43 ~]# rpm -qa | grep dhc
dhcp-common-4.4.2-15.b1.el9.noarch
dhcp-client-4.4.2-15.b1.el9.x86_64
[root@dell-per740-43 ~]# uname -a
Linux dell-per740-43.rhts.eng.pek2.redhat.com 5.14.0-96.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 19 07:21:30 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
Always .

Steps to Reproduce:
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   permissive
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.32-1.el9.noarch
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.256:162): proctitle=726D002D66002F72756E2F6368726F6E792D646863702F656E6F312E736F7572636573
type=SYSCALL msg=audit(1654522342.256:162): arch=c000003e syscall=262 success=no exit=-13 a0=ffffff9c a1=5612838376a0 a2=561283837610 a3=100 items=0 ppid=10961 pid=11001 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rm" exe="/usr/bin/rm" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.256:162): avc:  denied  { getattr } for  pid=11001 comm="rm" path="/run/chrony-dhcp/eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.256:163): proctitle=726D002D66002F72756E2F6368726F6E792D646863702F656E6F312E736F7572636573
type=SYSCALL msg=audit(1654522342.256:163): arch=c000003e syscall=263 success=no exit=-13 a0=ffffff9c a1=561283836380 a2=0 a3=100 items=0 ppid=10961 pid=11001 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="rm" exe="/usr/bin/rm" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.256:163): avc:  denied  { write } for  pid=11001 comm="rm" name="chrony-dhcp" dev="tmpfs" ino=1635 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=dir permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:164): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:164): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532bdba0 a2=441 a3=1b6 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:164): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:165): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:165): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532bdba0 a2=401 a3=0 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:165): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:166): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:166): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532b2560 a2=441 a3=1b6 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:166): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:167): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:167): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532b2560 a2=401 a3=0 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:167): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:168): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:168): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532b25c0 a2=441 a3=1b6 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:168): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0
----
time->Mon Jun  6 09:32:22 2022
type=PROCTITLE msg=audit(1654522342.257:169): proctitle=2F7573722F62696E2F62617368002F7573722F7362696E2F6468636C69656E742D736372697074
type=SYSCALL msg=audit(1654522342.257:169): arch=c000003e syscall=257 success=no exit=-13 a0=ffffff9c a1=55b0532b25c0 a2=401 a3=0 items=0 ppid=10944 pid=10961 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1654522342.257:169): avc:  denied  { append } for  pid=10961 comm="dhclient-script" name="eno1.sources" dev="tmpfs" ino=1899 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:chronyd_var_run_t:s0 tclass=file permissive=0

Actual results:
avc denied 

Expected results:
No avc denied  

Additional info:

Comment 3 Zdenek Pytela 2022-06-22 08:34:34 UTC
Commit to backport:
commit d3f2dfffe9293a47d57a17e804fc6c590e19081d (HEAD -> rawhide, upstream/rawhide)
Author: Zdenek Pytela <zpytela>
Date:   Tue Jun 21 17:45:28 2022 +0200

    Allow dhclient manage pid files used by chronyd

Comment 14 errata-xmlrpc 2022-11-15 11:13:52 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:8283

Comment 15 Zdenek Pytela 2023-02-27 16:06:27 UTC
*** Bug 2173479 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.