Bug 707190 - SELinux is preventing /usr/bin/boinc_client from 'name_bind' accesses on the tcp_socket port 1043.
Summary: SELinux is preventing /usr/bin/boinc_client from 'name_bind' accesses on the ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:2c6aa6388cf...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-24 10:59 UTC by Erik Berg
Modified: 2011-10-07 14:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-07 14:18:47 UTC
Type: ---


Attachments (Terms of Use)

Description Erik Berg 2011-05-24 10:59:46 UTC
SELinux is preventing /usr/bin/boinc_client from 'name_bind' accesses on the tcp_socket port 1043.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that boinc_client should be allowed name_bind access on the port 1043 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 boinc_client /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:boinc_t:s0
Target Context                system_u:object_r:boinc_t:s0
Target Objects                port 1043 [ tcp_socket ]
Source                        boinc_client
Source Path                   /usr/bin/boinc_client
Port                          1043
Host                          (removed)
Source RPM Packages           boinc-client-6.10.58-3.r22930svn.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-24.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64 #1 SMP Sun May 15
                              17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   30
First Seen                    Tue 24 May 2011 12:58:10 PM CEST
Last Seen                     Tue 24 May 2011 12:58:39 PM CEST
Local ID                      82538552-76c5-4ffa-a048-cd0acdcf2fbc

Raw Audit Messages
type=AVC msg=audit(1306234719.155:166): avc:  denied  { name_bind } for  pid=2698 comm="boinc_client" src=1043 scontext=system_u:system_r:boinc_t:s0 tcontext=system_u:object_r:boinc_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1306234719.155:166): arch=x86_64 syscall=bind success=no exit=EACCES a0=6 a1=7fff38cdace0 a2=10 a3=7fff38cdacdc items=0 ppid=1 pid=2698 auid=4294967295 uid=493 gid=490 euid=493 suid=493 fsuid=493 egid=490 sgid=490 fsgid=490 tty=(none) ses=4294967295 comm=boinc_client exe=/usr/bin/boinc_client subj=system_u:system_r:boinc_t:s0 key=(null)

Hash: boinc_client,boinc_t,boinc_t,tcp_socket,name_bind

audit2allow

#============= boinc_t ==============
allow boinc_t self:tcp_socket name_bind;

audit2allow -R

#============= boinc_t ==============
allow boinc_t self:tcp_socket name_bind;

Comment 1 Dominick Grift 2011-05-24 11:35:06 UTC
mgrepl committed this to master branch, created a new port type for boinc client control ports (might be over done? )

http://git.fedorahosted.org/git/?p=selinux-policy.git;a=commitdiff;h=b9bf037f6e61bd9f082fb54a610f5e17b51f34ee

Comment 2 Miroslav Grepl 2011-05-24 11:38:18 UTC
Erik,
you added boinc_t domain type for 1043/tcp port. You need to use a port type.

#sesearch -A -s boinc_t -c tcp_socket -p name_bind
Found 1 semantic av rules:
   allow boinc_t boinc_port_t : tcp_socket { name_bind name_connect } ;


So you need to execute

# semanage port -a -t boinc_port_t -p tcp 1043

will fix for now.

Comment 3 Dominick Grift 2011-05-24 12:14:23 UTC
notice something strange in this report, the target is "self" instead of "port_t"

Comment 4 Miroslav Grepl 2011-05-24 12:58:20 UTC
Erik,
actually if I am right and you executed

# semanage port -a -t boinc_t -p tcp 1043

we will need to run

# semanage port -m -t boinc_port_t -p tcp 1043


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