Bug 734754 - SELinux is preventing sssd from using the 'net_admin' capabilities.
Summary: SELinux is preventing sssd from using the 'net_admin' capabilities.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:02526f13f9e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-31 11:06 UTC by Jeff Layton
Modified: 2014-06-18 07:41 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 19:21:15 UTC


Attachments (Terms of Use)

Description Jeff Layton 2011-08-31 11:06:26 UTC
SELinux is preventing sssd from using the 'net_admin' capabilities.

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

If you believe that sssd should have the net_admin capability 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 sssd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:sssd_t:s0
Target Context                system_u:system_r:sssd_t:s0
Target Objects                Unknown [ capability ]
Source                        sssd
Source Path                   sssd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-38.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.40.4-5.fc15.x86_64 #1 SMP Tue Aug 30 14:38:32
                              UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 31 Aug 2011 06:56:53 AM EDT
Last Seen                     Wed 31 Aug 2011 06:56:53 AM EDT
Local ID                      ae26095f-0105-4678-be4e-be8c12453366

Raw Audit Messages
type=AVC msg=audit(1314788213.284:105): avc:  denied  { net_admin } for  pid=891 comm="sssd_be" capability=12  scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:system_r:sssd_t:s0 tclass=capability


Hash: sssd,sssd_t,sssd_t,capability,net_admin

audit2allow

#============= sssd_t ==============
allow sssd_t self:capability net_admin;

audit2allow -R

#============= sssd_t ==============
allow sssd_t self:capability net_admin;

Comment 1 Daniel Walsh 2011-08-31 14:35:33 UTC
Why does sssd need one of the following?

/* Allow interface configuration */
/* Allow administration of IP firewall, masquerading and accounting */
/* Allow setting debug option on sockets */
/* Allow modification of routing tables */
/* Allow setting arbitrary process / process group ownership on
   sockets */
/* Allow binding to any address for transparent proxying */
/* Allow setting TOS (type of service) */
/* Allow setting promiscuous mode */
/* Allow clearing driver statistics */
/* Allow multicasting */
/* Allow read/write of device-specific registers */
/* Allow activation of ATM control sockets */

Comment 2 Stephen Gallagher 2011-08-31 14:51:44 UTC
/* Allow modification of routing tables */

We're not modifying routing tables, but we do use libnl (netlink) to monitor for changes to the routing table while we're offline (as a mechanism for quickly detecting that we've gone online and to try to reconnect to the identity and auth servers).

Could this be causing this SELinux denial? We've been doing this for quite some time, so I'd be surprised if this appeared only recently.

What version of SSSD is in use here (and was this problem present on earlier versions)?

Comment 3 Jakub Hrozek 2011-08-31 19:52:20 UTC
(In reply to comment #2)
> /* Allow modification of routing tables */
> 
> We're not modifying routing tables, but we do use libnl (netlink) to monitor
> for changes to the routing table while we're offline (as a mechanism for
> quickly detecting that we've gone online and to try to reconnect to the
> identity and auth servers).
> 

Code-wise we are doing the following (simplified):
* nl_connect(nlh, NETLINK_ROUTE);
* nl_socket_add_membership(nlh, RTNLGRP_LINK);
* watch for IFF_LOWER_UP messages

I've been meaning to ask you -- we are going to subscribe ourselves into couple other RTNLGRP_* groups in the next upstream release. I've seen a couple SELinux denials when developing the code..how do I report them so they get fixed when the next SSSD version comes out?

Comment 4 Daniel Walsh 2011-09-06 14:47:46 UTC
Eric, Looks like we need to add net_admin for this access.

Jakub, best to open a bugzilla in Rawhide and maybe ping me.

Will this be going back into RHEL6?

Comment 5 Daniel Walsh 2011-09-06 14:49:11 UTC
Add this allow to F16/Rawhide policy.

Comment 6 Fedora End Of Life 2012-08-07 19:21:18 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.