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 1811759 - AVC denied when built ohpc-gnu9-easybuild container image: type=AVC msg=audit(1583773655.955:433): avc: denied { setattr } for pid=26347 comm="fuse-overlayfs"
Summary: AVC denied when built ohpc-gnu9-easybuild container image: type=AVC msg=audit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: container-selinux
Version: 7.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
: 1811762 (view as bug list)
Depends On:
Blocks: 1186913 1816260
TreeView+ depends on / blocked
 
Reported: 2020-03-09 17:15 UTC by Alex Jia
Modified: 2023-10-06 19:22 UTC (History)
8 users (show)

Fixed In Version: container-selinux-2.119.2-1.911c772.el7_8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-23 14:27:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2685 0 None None None 2020-06-23 14:27:40 UTC

Description Alex Jia 2020-03-09 17:15:43 UTC
Description of problem:
AVC denied when built ohpc-gnu9-easybuild container image.

Version-Release number of selected component (if applicable):
[ajia@hpe-bl460cgen8-01 ~]$ rpm -q fuse-overlayfs podman kernel
fuse-overlayfs-0.7.2-6.el7_8.x86_64
podman-1.6.4-13.el7_8.x86_64
kernel-3.10.0-1127.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. setup rootless environment 

2. $ cat Dockerfile.ohpc-gnu9-easybuild
FROM quay.io/ohpc/ohpc-gnu9:1.9.9

MAINTAINER The OpenHPC Project

RUN useradd -ms /bin/bash openhpc

RUN yum -y install EasyBuild-ohpc && \
    yum -y install patch make perl && \
    yum clean all

WORKDIR /home/openhpc
USER openhpc

ENV PATH="/opt/ohpc/pub/libs/easybuild/4.1.1/software/EasyBuild/4.1.1/bin:${PATH}"
ENV PYTHONPATH="/opt/ohpc/pub/libs/easybuild/4.1.1/software/EasyBuild/4.1.1/lib/python3.6/site-packages"

# This way all commands passed into the container are executed in a
# login shell which is necessary to get lmod working. Commands
# need to be enclosed in quotes.
ENTRYPOINT ["/bin/bash", "-l", "-c"]

$ podman build . -f Dockerfile.ohpc-gnu9-easybuild --tag=ohpc-gnu9-easybuild:1.9.9 

Actual results:

[ajia@hpe-bl460cgen8-01 ~]$ id
uid=1001(ajia) gid=1001(ajia) groups=1001(ajia) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[ajia@hpe-bl460cgen8-01 ~]$ podman unshare cat /proc/self/uid_map 
         0       1001          1
         1     165536      65536

[ajia@hpe-bl460cgen8-01 ~]$ podman build . -f Dockerfile.ohpc-gnu9-easybuild --tag=ohpc-gnu9-easybuild:1.9.9
...ignore...

[root@hpe-bl460cgen8-01 ~]# tailf /var/log/audit/audit.log 
...ignore...
type=AVC msg=audit(1583773655.955:433): avc:  denied  { setattr } for  pid=26347 comm="fuse-overlayfs" name="1060" dev="proc" ino=20406 scontext=unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023 tclass=lnk_file permissive=0

type=AVC msg=audit(1583773656.001:434): avc:  denied  { setattr } for  pid=26347 comm="fuse-overlayfs" name="1061" dev="proc" ino=20407 scontext=unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023 tclass=lnk_file permissive=0


Expected results:


Additional info:

Comment 12 Daniel Walsh 2020-05-01 12:08:40 UTC
No you can not take the RHEL8 container-selinux and install it on a RHEL7 box.  The RHEL 7 system is too old.  If we want to fix this then we need to update the RHEL7 branch of containers-selinux.

The question is, whether or not we will update any more RHEL7 packages.   One good thing about updating container-selinux is that it is very unlikely to cause regressions, since we are just adding more allow rules.

Comment 20 Jindrich Novy 2020-06-04 07:12:06 UTC
*** Bug 1811762 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2020-06-23 14:27:36 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, 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-2020:2685


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