Skip to content
Snippets Groups Projects
Commit 17859404 authored by Stephen Smalley's avatar Stephen Smalley
Browse files

Address dnsmasq denials.


Address dnsmasq denials such as:

 avc:  denied  { use } for  pid=9145 comm="dnsmasq" path="pipe:[29234]" dev="pipefs" ino=29234 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=fd
 avc:  denied  { read } for  pid=9145 comm="dnsmasq" path="pipe:[29234]" dev="pipefs" ino=29234 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=fifo_file
 avc:  denied  { read write } for  pid=9145 comm="dnsmasq" path="socket:[7860]" dev="sockfs" ino=7860 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=netlink_kobject_uevent_socket
 avc:  denied  { read write } for  pid=9145 comm="dnsmasq" path="socket:[8221]" dev="sockfs" ino=8221 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=unix_stream_socket
 avc:  denied  { read write } for  pid=9523 comm="dnsmasq" path="socket:[7860]" dev="sockfs" ino=7860 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=netlink_kobject_uevent_socket
 avc:  denied  { read write } for  pid=9523 comm="dnsmasq" path="socket:[7862]" dev="sockfs" ino=7862 scontext=u:r:dnsmasq:s0 tcontext=u:r:netd:s0 tclass=netlink_route_socket
 avc:  denied  { net_raw } for  pid=9607 comm="dnsmasq" capability=13  scontext=u:r:dnsmasq:s0 tcontext=u:r:dnsmasq:s0 tclass=capability
 avc:  denied  { net_admin } for  pid=9607 comm="dnsmasq" capability=12  scontext=u:r:dnsmasq:s0 tcontext=u:r:dnsmasq:s0 tclass=capability

Change-Id: I2bd1eaf22879f09df76a073028cc282362eebeee
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent d9d9d2f4
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,16 @@ type dnsmasq_exec, exec_type, file_type; ...@@ -5,7 +5,16 @@ type dnsmasq_exec, exec_type, file_type;
net_domain(dnsmasq) net_domain(dnsmasq)
allow dnsmasq self:capability { net_bind_service setgid setuid }; allow dnsmasq self:capability { net_admin net_raw net_bind_service setgid setuid };
allow dnsmasq dhcp_data_file:dir w_dir_perms; allow dnsmasq dhcp_data_file:dir w_dir_perms;
allow dnsmasq dhcp_data_file:file create_file_perms; allow dnsmasq dhcp_data_file:file create_file_perms;
# Inherit and use open files from netd.
allow dnsmasq netd:fd use;
allow dnsmasq netd:fifo_file { read write };
# TODO: Investigate whether these inherited sockets should be closed on exec.
allow dnsmasq netd:netlink_kobject_uevent_socket { read write };
allow dnsmasq netd:netlink_nflog_socket { read write };
allow dnsmasq netd:netlink_route_socket { read write };
allow dnsmasq netd:unix_stream_socket { read write };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment