Bug 1367834 - New cloud-init version requires dhclient to call cloud-init [NEEDINFO]
Summary: New cloud-init version requires dhclient to call cloud-init
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.3
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-17 15:19 UTC by Brent Baude
Modified: 2016-11-04 02:37 UTC (History)
9 users (show)

Fixed In Version: selinux-policy-3.13.1-95.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 02:37:07 UTC
Target Upstream Version:
mmalik: needinfo? (bbaude)


Attachments (Terms of Use)
TE policy file. (814 bytes, text/plain)
2016-08-17 15:19 UTC, Brent Baude
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2283 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2016-11-03 13:36:25 UTC

Description Brent Baude 2016-08-17 15:19:00 UTC
Created attachment 1191662 [details]
TE policy file.

Description of problem:

A new version of cloud-init that supports the effort to provision RHEL Atomic on Microsoft Azure requires some a new policy that allows dhclient/dhclient hooks to call cloud-init.

A sample of the log:

type=AVC msg=audit(1471446337.842:847): avc:  denied  { getattr } for  pid=5514 comm="dhclient-script" path="/usr/bin/cloud-init" dev="sda2" ino=34851037 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cloud_init_exec_t:s0 tclass=file
type=SYSCALL msg=audit(1471446337.842:847): arch=c000003e syscall=4 success=no exit=-13 a0=1320e70 a1=7ffdea8a8ec0 a2=7ffdea8a8ec0 a3=4 items=0 ppid=5472 pid=5514 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1471446337.842:848): avc:  denied  { getattr } for  pid=5514 comm="dhclient-script" path="/usr/bin/cloud-init" dev="sda2" ino=34851037 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cloud_init_exec_t:s0 tclass=file
type=SYSCALL msg=audit(1471446337.842:848): arch=c000003e syscall=4 success=no exit=-13 a0=1320e70 a1=7ffdea8a8ec0 a2=7ffdea8a8ec0 a3=4 items=0 ppid=5472 pid=5514 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=2 comm="dhclient-script" exe="/usr/bin/bash" subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
type=NETFILTER_CFG msg=audit(1471446338.312:849): table=filter family=2 entries=79
[root@baude-rhel-ci3 dhclient.d]# audit2allow -a


#============= dhcpc_t ==============
allow dhcpc_t cloud_init_exec_t:file { execute getattr read open ioctl execute_no_trans };
allow dhcpc_t cloud_var_lib_t:file { read getattr open };
allow dhcpc_t cloud_var_lib_t:lnk_file read;
allow dhcpc_t ldconfig_exec_t:file { read execute open execute_no_trans };
allow dhcpc_t var_run_t:file unlink;

I will attach the policy.

Comment 3 Lukas Vrabec 2016-08-23 10:02:38 UTC
Could you attach raw AVC msgs?

Thank you.

Comment 9 Milos Malik 2016-09-06 10:42:11 UTC
Please, re-run your scenario after installing the latest selinux-policy* packages (3.13.1-96.el7). Let us know, if the scenario generates any SELinux denials.

Comment 12 errata-xmlrpc 2016-11-04 02:37:07 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-2016-2283.html


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