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 1113922 - AVC denial when running docker build
Summary: AVC denial when running docker build
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-27 08:40 UTC by Jan Pazdziora
Modified: 2015-03-05 10:40 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.13.1-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:40:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0458 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2015-03-05 15:17:00 UTC

Description Jan Pazdziora 2014-06-27 08:40:16 UTC
Description of problem:

Sometimes when running docker build, AVC denial

type=AVC msg=audit(1403853327.352:480): avc:  denied  { mknod } for  pid=2832 comm="mknod" capability=27  scontext=system_u:system_r:svirt_lxc_net_t:s0:c420,c758 tcontext=system_u:system_r:svirt_lxc_net_t:s0:c420,c758 tclass=capability

is logged.

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

docker-0.11.1-19.el7.x86_64
selinux-policy-targeted-3.12.1-153.el7.noarch

How reproducible:

Not deterministic.

Steps to Reproduce:
1. Run docker build for some Dockerfile.
2. Observe audit.log.

Actual results:

type=SYSCALL msg=audit(1403854285.106:579): arch=c000003e syscall=133 success=no exit=-1 a0=7fffae76abd7 a1=21b6 a2=10b a3=7fffae769130 items=0 ppid=5489 pid=77
78 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mknod" exe="/usr/bin/mknod" subj=system_u:system_r:sv
irt_lxc_net_t:s0:c31,c293 key=(null)
type=AVC msg=audit(1403854285.107:580): avc:  denied  { mknod } for  pid=7779 comm="mknod" capability=27  scontext=system_u:system_r:svirt_lxc_net_t:s0:c31,c293
 tcontext=system_u:system_r:svirt_lxc_net_t:s0:c31,c293 tclass=capability

Expected results:

No AVC denial.

Additional info:

I also saw it on Fedora 20 with docker-io-1.0.0-4.fc20.x86_64.

Comment 2 Daniel Walsh 2014-10-03 15:56:21 UTC
Any idea which package is doing a mknod?  Sadly I believe we will need to allow this...

Comment 3 Milos Malik 2014-10-03 18:20:29 UTC
# rpm -qa selinux-policy\*
selinux-policy-3.13.1-1.el7.noarch
selinux-policy-devel-3.13.1-1.el7.noarch
selinux-policy-targeted-3.13.1-1.el7.noarch
selinux-policy-mls-3.13.1-1.el7.noarch
# sesearch -s svirt_lxc_net_t -t svirt_lxc_net_t -c capability -A -C -p mknod
Found 3 semantic av rules:
   allow svirt_lxc_net_t svirt_lxc_net_t : capability { chown dac_override fowner kill setgid setuid setpcap net_bind_service net_admin net_raw sys_chroot mknod audit_write setfcap } ; 
DT allow svirt_lxc_net_t svirt_lxc_net_t : capability mknod ; [ virt_sandbox_use_mknod ]
DT allow svirt_lxc_net_t svirt_lxc_net_t : capability { chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap } ; [ virt_sandbox_use_all_caps ]
#

It's already allowed in rebased policy for RHEL-7.1.

Comment 4 Daniel Walsh 2014-10-03 19:57:52 UTC
Yes.

Fixed in 7.1

selinux-policy-3.13.1-1.el7.noarch

Comment 9 errata-xmlrpc 2015-03-05 10:40:31 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://rhn.redhat.com/errata/RHBA-2015-0458.html


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