Bug 1602343 - the dhcpcd service triggers various SELinux denials
Summary: the dhcpcd service triggers various SELinux denials
Keywords:
Status: CLOSED DUPLICATE of bug 1585971
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 28
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-18 08:53 UTC by Milos Malik
Modified: 2018-07-22 10:28 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-07-22 10:28:31 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Milos Malik 2018-07-18 08:53:05 UTC
Description of problem:
following SELinux policy rules seem to be missing:
allow dhcpc_t self:netlink_generic_socket create;
allow dhcpc_t self:netlink_kobject_uevent_socket create;
allow dhcpc_t self:rawip_socket create;
allow dhcpc_t var_run_t:sock_file create;

Version-Release number of selected component (if applicable):
dhcpcd-6.11.3-5.fc28.x86_64
selinux-policy-3.14.1-32.fc28.noarch
selinux-policy-devel-3.14.1-32.fc28.noarch
selinux-policy-doc-3.14.1-32.fc28.noarch
selinux-policy-minimum-3.14.1-32.fc28.noarch
selinux-policy-mls-3.14.1-32.fc28.noarch
selinux-policy-targeted-3.14.1-32.fc28.noarch

How reproducible:
 * always

Steps to Reproduce:
1. get a Fedora 28 machine (targeted policy is active)
2. start the dhcpcd service
3. search for SELinux denials

Actual results (enforcing mode):
----
type=PROCTITLE msg=audit(07/18/2018 10:34:37.372:511) : proctitle=/usr/sbin/dhcpcd -q --nobackground 
type=PATH msg=audit(07/18/2018 10:34:37.372:511) : item=1 name=/var/run/dhcpcd.sock nametype=CREATE cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=PATH msg=audit(07/18/2018 10:34:37.372:511) : item=0 name=/var/run/ inode=11741 dev=00:16 mode=dir,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:var_run_t:s0 nametype=PARENT cap_fp=none cap_fi=none cap_fe=0 cap_fver=0 
type=CWD msg=audit(07/18/2018 10:34:37.372:511) : cwd=/ 
type=SOCKADDR msg=audit(07/18/2018 10:34:37.372:511) : saddr={ fam=local path=/var/run/dhcpcd.sock } 
type=SYSCALL msg=audit(07/18/2018 10:34:37.372:511) : arch=x86_64 syscall=bind success=no exit=EACCES(Permission denied) a0=0x8 a1=0x7fff9c1d1520 a2=0x16 a3=0x7fffffff items=2 ppid=1 pid=6760 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcpcd exe=/usr/sbin/dhcpcd subj=system_u:system_r:dhcpc_t:s0 key=(null) 
type=AVC msg=audit(07/18/2018 10:34:37.372:511) : avc:  denied  { create } for  pid=6760 comm=dhcpcd name=dhcpcd.sock scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=sock_file permissive=0 
----
type=PROCTITLE msg=audit(07/18/2018 10:34:37.380:512) : proctitle=/usr/sbin/dhcpcd -q --nobackground 
type=SYSCALL msg=audit(07/18/2018 10:34:37.380:512) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=netlink a1=SOCK_RAW a2=xnet a3=0x55ac9e42b010 items=0 ppid=1 pid=6760 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcpcd exe=/usr/sbin/dhcpcd subj=system_u:system_r:dhcpc_t:s0 key=(null) 
type=AVC msg=audit(07/18/2018 10:34:37.380:512) : avc:  denied  { create } for  pid=6760 comm=dhcpcd scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:system_r:dhcpc_t:s0 tclass=netlink_kobject_uevent_socket permissive=0 
----
type=PROCTITLE msg=audit(07/18/2018 10:34:37.381:513) : proctitle=/usr/sbin/dhcpcd -q --nobackground 
type=SYSCALL msg=audit(07/18/2018 10:34:37.381:513) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=netlink a1=SOCK_RAW a2=chaos a3=0x55ac9e42b010 items=0 ppid=1 pid=6760 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcpcd exe=/usr/sbin/dhcpcd subj=system_u:system_r:dhcpc_t:s0 key=(null) 
type=AVC msg=audit(07/18/2018 10:34:37.381:513) : avc:  denied  { create } for  pid=6760 comm=dhcpcd scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:system_r:dhcpc_t:s0 tclass=netlink_generic_socket permissive=0 
----
type=PROCTITLE msg=audit(07/18/2018 10:34:37.382:514) : proctitle=/usr/sbin/dhcpcd -q --nobackground 
type=SYSCALL msg=audit(07/18/2018 10:34:37.382:514) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=netlink a1=SOCK_RAW a2=chaos a3=0x0 items=0 ppid=1 pid=6760 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcpcd exe=/usr/sbin/dhcpcd subj=system_u:system_r:dhcpc_t:s0 key=(null) 
type=AVC msg=audit(07/18/2018 10:34:37.382:514) : avc:  denied  { create } for  pid=6760 comm=dhcpcd scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:system_r:dhcpc_t:s0 tclass=netlink_generic_socket permissive=0 
----
type=PROCTITLE msg=audit(07/18/2018 10:34:38.304:515) : proctitle=/usr/sbin/dhcpcd -q --nobackground 
type=SYSCALL msg=audit(07/18/2018 10:34:38.304:515) : arch=x86_64 syscall=socket success=no exit=EACCES(Permission denied) a0=inet6 a1=SOCK_RAW a2=ipv6-icmp a3=0x4000 items=0 ppid=1 pid=6760 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=dhcpcd exe=/usr/sbin/dhcpcd subj=system_u:system_r:dhcpc_t:s0 key=(null) 
type=AVC msg=audit(07/18/2018 10:34:38.304:515) : avc:  denied  { create } for  pid=6760 comm=dhcpcd scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:system_r:dhcpc_t:s0 tclass=rawip_socket permissive=0 
----

Expected results:
 * no SELinux denials

Comment 1 Milos Malik 2018-07-18 08:59:04 UTC
I'm sorry, this bug is a duplicate of BZ#1585971.

Comment 2 Lukas Vrabec 2018-07-22 10:28:31 UTC

*** This bug has been marked as a duplicate of bug 1585971 ***


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