Bug 611036 - SELinux is preventing /usr/bin/mpd "name_connect" access .
SELinux is preventing /usr/bin/mpd "name_connect" access .
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
setroubleshoot_trace_hash:23c05882114...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-03 05:21 EDT by rvcsaba
Modified: 2011-06-01 11:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-01 11:32:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description rvcsaba 2010-07-03 05:21:50 EDT
Summary:

SELinux is preventing /usr/bin/mpd "name_connect" access .

Detailed Description:

[mpd has a permissive type (mpd_t). This access was not denied.]

SELinux denied access requested by mpd. It is not expected that this access is
required by mpd and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:mpd_t:s0
Target Context                system_u:object_r:http_cache_port_t:s0
Target Objects                None [ tcp_socket ]
Source                        mpd
Source Path                   /usr/bin/mpd
Port                          8080
Host                          (removed)
Source RPM Packages           mpd-0.15.8-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-34.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-142.rc1.fc13.x86_64 #1 SMP Fri
                              Jul 2 06:18:21 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 03 Jul 2010 11:17:09 AM CEST
Last Seen                     Sat 03 Jul 2010 11:17:09 AM CEST
Local ID                      e9b20ed7-2ecf-4cab-979c-fb3fc03b7e25
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1278148629.187:36877): avc:  denied  { name_connect } for  pid=2423 comm="mpd" dest=8080 scontext=system_u:system_r:mpd_t:s0 tcontext=system_u:object_r:http_cache_port_t:s0 tclass=tcp_socket

node=(removed) type=SYSCALL msg=audit(1278148629.187:36877): arch=c000003e syscall=42 success=yes exit=128 a0=a a1=7f1f4d94b750 a2=10 a3=0 items=0 ppid=1 pid=2423 auid=4294967295 uid=487 gid=467 euid=487 suid=487 fsuid=487 egid=467 sgid=467 fsgid=467 tty=(none) ses=4294967295 comm="mpd" exe="/usr/bin/mpd" subj=system_u:system_r:mpd_t:s0 key=(null)


Comment: I use mpd, netradio.

Hash String generated from  catchall,mpd,mpd_t,http_cache_port_t,tcp_socket,name_connect
audit2allow suggests:

#============= mpd_t ==============
allow mpd_t http_cache_port_t:tcp_socket name_connect;
Comment 1 Miroslav Grepl 2010-07-04 17:47:31 EDT
You can add this rule for now using

# grep mpd /var/log/audit/audit.log | audit2allow -M mympd
# semodule -i mympd.pp
Comment 2 rvcsaba 2010-07-06 17:22:01 EDT
(In reply to comment #1)

Thank you for help me!
Comment 3 rvcsaba 2010-07-06 19:08:35 EDT
Which PORT_TYPE? Next message:


Summary:

SELinux is preventing /usr/bin/mpd from connecting to port 8010.

Detailed Description:

SELinux has denied mpd from connecting to a network port 8010 which does not
have an SELinux type associated with it. If mpd should be allowed to connect on
8010, use the semanage command to assign 8010 to a port type that mpd_t can
connect to (ldap_port_t, dns_port_t, http_cache_port_t, http_port_t,
pulseaudio_port_t, kerberos_port_t, ocsp_port_t).
If mpd is not supposed to connect to 8010, this could signal a intrusion
attempt.

Allowing Access:

If you want to allow mpd to connect to 8010, you can execute
semanage port -a -t PORT_TYPE -p tcp 8010
where PORT_TYPE is one of the following: ldap_port_t, dns_port_t,
http_cache_port_t, http_port_t, pulseaudio_port_t, kerberos_port_t, ocsp_port_t.

Additional Information:

Source Context                system_u:system_r:mpd_t:s0
Target Context                system_u:object_r:port_t:s0
Target Objects                None [ tcp_socket ]
Source                        mpd
Source Path                   /usr/bin/mpd
Port                          8010
Host                          deer
Source RPM Packages           mpd-0.15.8-1.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-34.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   connect_ports
Host Name                     deer
Platform                      Linux deer 2.6.33.6-146.fc13.x86_64 #1 SMP Tue Jul
                              6 16:26:06 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 07 Jul 2010 12:59:35 AM CEST
Last Seen                     Wed 07 Jul 2010 12:59:35 AM CEST
Local ID                      0c89b1c4-7027-4962-8b41-e205732eaf34
Line Numbers                  

Raw Audit Messages            

node=deer type=AVC msg=audit(1278457175.165:36980): avc:  denied  { name_connect } for  pid=2425 comm="mpd" dest=8010 scontext=system_u:system_r:mpd_t:s0 tcontext=system_u:object_r:port_t:s0 tclass=tcp_socket

node=deer type=SYSCALL msg=audit(1278457175.165:36980): arch=c000003e syscall=42 success=no exit=-115 a0=a a1=7f41872d3750 a2=10 a3=0 items=0 ppid=1 pid=2425 auid=4294967295 uid=487 gid=467 euid=487 suid=487 fsuid=487 egid=467 sgid=467 fsgid=467 tty=(none) ses=4294967295 comm="mpd" exe="/usr/bin/mpd" subj=system_u:system_r:mpd_t:s0 key=(null)
Comment 4 Miroslav Grepl 2010-07-09 03:37:01 EDT
(In reply to comment #1)
> You can add this rule for now using
> 
> # grep mpd /var/log/audit/audit.log | audit2allow -M mympd
> # semodule -i mympd.pp    

Fixed in selinux-policy-3.7.19-34.fc13
Comment 5 Miroslav Grepl 2010-07-09 03:40:59 EDT
(In reply to comment #3)
> Which PORT_TYPE? Next message:
> 
> 

For example:

semanage port -a -t http_cache_port_t -p tcp 8010
Comment 6 rvcsaba 2010-07-09 05:49:58 EDT
(In reply to comment #4)

> Fixed in selinux-policy-3.7.19-34.fc13    

Are you sure? I used selinux-policy-3.7.19-34.fc13. You fixed in -35.
Comment 7 Miroslav Grepl 2010-07-09 06:18:34 EDT
Oops. Yes, you are right. I will build -35 release today. Thanks.
Comment 8 Fedora Update System 2010-07-14 10:24:46 EDT
selinux-policy-3.7.19-37.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-37.fc13
Comment 9 Fedora Update System 2010-07-14 19:06:47 EDT
selinux-policy-3.7.19-37.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update selinux-policy'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/selinux-policy-3.7.19-37.fc13
Comment 10 Fedora Admin XMLRPC Client 2010-11-08 16:51:43 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 11 Fedora Admin XMLRPC Client 2010-11-08 16:53:03 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 12 Fedora Admin XMLRPC Client 2010-11-08 16:55:41 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 13 Bug Zapper 2011-06-01 10:52:17 EDT
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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