Bug 888676 - SELinux is preventing /usr/sbin/real-bin/dnsmasq from 'name_bind' accesses on the tcp_socket .
Summary: SELinux is preventing /usr/sbin/real-bin/dnsmasq from 'name_bind' accesses on...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6d8a6cf6eb97731da1616d58ef8...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-19 08:07 UTC by MaPo
Modified: 2012-12-19 14:54 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-19 14:54:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-12-19 08:07 UTC, MaPo
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-12-19 08:07 UTC, MaPo
no flags Details

Description MaPo 2012-12-19 08:07:00 UTC
Description of problem:
as a result of neworkmanager/libvirtd dnsmasq startup

Additional info:
libreport version: 2.0.18
kernel:         3.6.9-2.fc17.x86_64

description:
:SELinux is preventing /usr/sbin/real-bin/dnsmasq from 'name_bind' accesses on the tcp_socket .
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that dnsmasq should be allowed name_bind access on the  tcp_socket by default.
:Then you should report this as a bug.
:You can generate a local policy module to allow this access.
:Do
:allow this access for now by executing:
:# grep dnsmasq /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:NetworkManager_t:s0
:Target Context                system_u:object_r:dns_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        dnsmasq
:Source Path                   /usr/sbin/real-bin/dnsmasq
:Port                          53
:Host                          (removed)
:Source RPM Packages           
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.9-2.fc17.x86_64 #1 SMP Tue Dec
:                              4 13:26:04 UTC 2012 x86_64 x86_64
:Alert Count                   200
:First Seen                    2012-11-03 17:00:16 CET
:Last Seen                     2012-12-19 08:55:16 CET
:Local ID                      018ef374-3a7c-40f6-b3a0-a260bf374ce6
:
:Raw Audit Messages
:type=AVC msg=audit(1355903716.282:183): avc:  denied  { name_bind } for  pid=3497 comm="dnsmasq" src=53 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:dns_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1355903716.282:183): arch=x86_64 syscall=bind success=yes exit=0 a0=5 a1=157af40 a2=10 a3=7fffb6df332c items=0 ppid=878 pid=3497 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=dnsmasq exe=/usr/sbin/real-bin/dnsmasq subj=system_u:system_r:NetworkManager_t:s0 key=(null)
:
:Hash: dnsmasq,NetworkManager_t,dns_port_t,tcp_socket,name_bind
:
:audit2allow
:
:#============= NetworkManager_t ==============
:allow NetworkManager_t dns_port_t:tcp_socket name_bind;
:
:audit2allow -R
:
:#============= NetworkManager_t ==============
:allow NetworkManager_t dns_port_t:tcp_socket name_bind;
:

Comment 1 MaPo 2012-12-19 08:07:04 UTC
Created attachment 665946 [details]
File: type

Comment 2 MaPo 2012-12-19 08:07:06 UTC
Created attachment 665947 [details]
File: hashmarkername

Comment 3 Daniel Walsh 2012-12-19 14:54:57 UTC
Looks like you replaced the default dnsmasq with real-bin/dnsmasq, and the labelling is wrong.

# semanage fcontext -a -e /usr/sbin/real-bin /usr/sbin
# restorecon -R -v /usr/sbin/


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