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 1842897 - Denied NetworkManager write to /var/tmp/dracut.*/systemd-cat while generating initrd image
Summary: Denied NetworkManager write to /var/tmp/dracut.*/systemd-cat while generating...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: selinux-policy
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.4
Assignee: Zdenek Pytela
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks: 1834275
TreeView+ depends on / blocked
 
Reported: 2020-06-02 11:06 UTC by Martin Pitt
Modified: 2021-05-18 14:57 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:57:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Pitt 2020-06-02 11:06:30 UTC
Description of problem: Within the last 7 days, RHEL 8.3 got a regression. During our kdump test, it rebuilds the initrd for enabling kdump:

dracut[15203]: Executing: /usr/bin/dracut --quiet --hostonly --hostonly-cmdline --hostonly-i18n --hostonly-mode strict -o "plymouth dash resume ifcfg earlykdump" --add ssh-client --sshkey /root/.ssh/id_rsa --no-hostonly-default-device -f /boot/initramfs-5.3.0-0.rc6.git0.1.fc31.x86_64kdump.img 5.3.0-0.rc6.git0.1.fc31.x86_64

which yields an SELinux denial:

audit: type=1400 audit(*): avc:  denied  { write } for  pid=* comm="NetworkManager" path="/var/tmp/dracut.*/systemd-cat" dev="dm-0" ino=* scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:kdumpctl_tmp_t:s0 tclass=fifo_file permissive=0

This was already reported and fixed in Fedora 31 half a year ago in bug 1750428, but now it crept into RHEL 8.3.

Full journal:
https://logs.cockpit-project.org/logs/pull-920-20200602-083214-f21c0be3-rhel-8-3-cockpit-project-cockpit/TestKdump-testBasic-rhel-8-3-127.0.0.2-2501-FAIL.log.gz

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

selinux-policy-3.14.3-44.el8.noarch
dracut-049-85.git20200527.el8.x86_64


How reproducible: Always

Comment 1 Zdenek Pytela 2020-06-02 11:14:52 UTC
This commit needs to be backported:

commit 4d471274fc9696898a0618cc7262dfc70fd73269
Author: Lukas Vrabec <lvrabec>
Date:   Wed Sep 25 13:37:57 2019 +0200

    Dontaudit NetworkManager_t domain to write to kdump temp pipies BZ(1750428)

diff --git a/networkmanager.te b/networkmanager.te
index 116b22c0c..ccff83eb7 100644
--- a/networkmanager.te
+++ b/networkmanager.te
@@ -347,6 +347,10 @@ optional_policy(`
     lldpad_dgram_send(NetworkManager_t)
 ')
 
+optional_policy(`
+    kdump_dontaudit_inherited_kdumpctl_tmp_pipes(NetworkManager_t)
+')
+

unless there was an issue with functionality; off the logs, I cannot confirm any.

I would not call it a regression in selinux-policy though.

Comment 2 Martin Pitt 2020-06-02 11:18:34 UTC
@Zdenek: I set the flag as it didn't happen in RHEL 8.3 until last week. It's not a major bug, of course. Thanks!

Comment 3 Milos Malik 2020-06-29 11:59:36 UTC
Found by one of our automated TCs:
----
type=PROCTITLE msg=audit(06/29/2020 10:37:55.675:4250) : proctitle=NetworkManager --version 
type=PATH msg=audit(06/29/2020 10:37:55.675:4250) : item=1 name=/lib64/ld-linux-x86-64.so.2 inode=10103 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(06/29/2020 10:37:55.675:4250) : item=0 name=/usr/sbin/NetworkManager inode=461437 dev=fd:01 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:NetworkManager_exec_t:s0 nametype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 cap_frootid=0 
type=CWD msg=audit(06/29/2020 10:37:55.675:4250) : cwd=/ 
type=EXECVE msg=audit(06/29/2020 10:37:55.675:4250) : argc=2 a0=NetworkManager a1=--version 
type=SYSCALL msg=audit(06/29/2020 10:37:55.675:4250) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x563f03f55750 a1=0x563f0404c540 a2=0x563f04179b00 a3=0x8 items=2 ppid=253936 pid=255324 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=NetworkManager exe=/usr/sbin/NetworkManager subj=system_u:system_r:NetworkManager_t:s0 key=(null) 
type=AVC msg=audit(06/29/2020 10:37:55.675:4250) : avc:  denied  { write } for  pid=255324 comm=NetworkManager path=/var/tmp/dracut.KP1ykH/systemd-cat dev="vda1" ino=20971841 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=fifo_file permissive=0 
----

Comment 17 errata-xmlrpc 2021-05-18 14:57:37 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-2021:1639


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