Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1844361

Summary: AVC after or during building podman image
Product: Red Hat Enterprise Linux 8 Reporter: Jan Blazek <jblazek>
Component: container-selinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: jnovy, lvrabec, mmalik, plautrba, ssekidde, tsweeney
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-28 11:20:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Blazek 2020-06-05 08:22:22 UTC
Description of problem:

ci-dnf-stack (aka DNF upstream testsuite) used wrapped into /CoreOS/dnf/Sanity/run-upstream-tests-on-rhel started to fail because of SELinux. After or during building a podman image it throws following AVC:

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:      32
selinux-policy-3.14.3-44.el8.noarch
----
time->Thu Jun  4 10:54:04 2020
type=PROCTITLE msg=audit(1591282444.072:101): proctitle=2F7362696E2F7564657661646D0074726967676572002D2D73756273797374656D2D6D617463683D6E6574002D2D616374696F6E3D6368616E6765
type=SYSCALL msg=audit(1591282444.072:101): arch=80000016 syscall=288 success=no exit=-13 a0=ffffffffffffff9c a1=3ffca07f358 a2=80001 a3=0 items=0 ppid=21264 pid=21266 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevadm" exe="/usr/bin/udevadm" subj=system_u:system_r:container_t:s0:c40,c699 key=(null)
type=AVC msg=audit(1591282444.072:101): avc:  denied  { write } for  pid=21266 comm="udevadm" name="uevent" dev="sysfs" ino=10869 scontext=system_u:system_r:container_t:s0:c40,c699 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0
----
time->Thu Jun  4 10:54:04 2020
type=PROCTITLE msg=audit(1591282444.072:102): proctitle=2F7362696E2F7564657661646D0074726967676572002D2D73756273797374656D2D6D617463683D6E6574002D2D616374696F6E3D6368616E6765
type=SYSCALL msg=audit(1591282444.072:102): arch=80000016 syscall=288 success=no exit=-13 a0=ffffffffffffff9c a1=3ffca07f358 a2=80001 a3=0 items=0 ppid=21264 pid=21266 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="udevadm" exe="/usr/bin/udevadm" subj=system_u:system_r:container_t:s0:c40,c699 key=(null)
type=AVC msg=audit(1591282444.072:102): avc:  denied  { write } for  pid=21266 comm="udevadm" name="uevent" dev="sysfs" ino=1762 scontext=system_u:system_r:container_t:s0:c40,c699 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=0


Additional info:
https://beaker.engineering.redhat.com/jobs/4327639


Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-44.el8

How reproducible:
always

Steps to Reproduce:
Easiest way is to clone following Beaker job:
https://beaker.engineering.redhat.com/jobs/4327639

Comment 1 Zdenek Pytela 2020-06-19 16:08:13 UTC
Switching the component based on a team discussion.

Comment 3 Daniel Walsh 2021-01-28 11:20:48 UTC
This indicates a container attempting to set something in /sys/fs.  Not something we want to allow.

Did the application actually fail?  Or was an AVC just seen?

Most likely this container needs to be build without SELinux protections.

--security-opt label=disabled

Will achieve this.  But from a security point of view we do not want to allow this action from within a container by default.

I am going to close this as NOTABUG.