Bug 740534 - SELinux is preventing /usr/sbin/sssd from 'read' accesses on the lnk_file tun0.
Summary: SELinux is preventing /usr/sbin/sssd from 'read' accesses on the lnk_file tun0.
Keywords:
Status: CLOSED ERRATA
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:65d4d9d4b97...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-22 11:30 UTC by Stephen Gallagher
Modified: 2011-12-04 02:36 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.9.16-48.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-04 02:36:12 UTC


Attachments (Terms of Use)

Description Stephen Gallagher 2011-09-22 11:30:07 UTC
SELinux is preventing /usr/sbin/sssd from 'read' accesses on the lnk_file tun0.

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

If you believe that sssd should be allowed read access on the tun0 lnk_file 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:object_r:sysfs_t:s0
Target Objects                tun0 [ lnk_file ]
Source                        sssd
Source Path                   /usr/sbin/sssd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sssd-1.7.0-0.20110920T1921Zgit1f6ef30.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
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                    Thu 22 Sep 2011 07:27:23 AM EDT
Last Seen                     Thu 22 Sep 2011 07:29:01 AM EDT
Local ID                      e65ae775-1cf8-45d4-8641-794dcc49400d

Raw Audit Messages
type=AVC msg=audit(1316690941.78:101): avc:  denied  { read } for  pid=1964 comm="sssd" name="tun0" dev=sysfs ino=20509 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=lnk_file


type=AVC msg=audit(1316690941.78:101): avc:  denied  { read } for  pid=1964 comm="sssd" name="type" dev=sysfs ino=20517 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file


type=AVC msg=audit(1316690941.78:101): avc:  denied  { open } for  pid=1964 comm="sssd" name="type" dev=sysfs ino=20517 scontext=system_u:system_r:sssd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file


type=SYSCALL msg=audit(1316690941.78:101): arch=x86_64 syscall=open success=yes exit=EEXIST a0=7fff2eb32820 a1=0 a2=7fff2eb32838 a3=722c70752c707261 items=0 ppid=1 pid=1964 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=sssd exe=/usr/sbin/sssd subj=system_u:system_r:sssd_t:s0 key=(null)

Hash: sssd,sssd_t,sysfs_t,lnk_file,read

audit2allow

#============= sssd_t ==============
allow sssd_t sysfs_t:file { read open };
allow sssd_t sysfs_t:lnk_file read;

audit2allow -R

#============= sssd_t ==============
allow sssd_t sysfs_t:file { read open };
allow sssd_t sysfs_t:lnk_file read;

Comment 1 Daniel Walsh 2011-09-22 13:04:40 UTC
Stephen something new?

Comment 2 Jakub Hrozek 2011-09-22 14:23:09 UTC
(In reply to comment #1)
> Stephen something new?

Stephen seems to be running sssd-1.7.0-0.20110920T1921Zgit1f6ef30.fc15 which is an upstream snapshot. It changed the way we are using libnl. In particular, we are doing some ioctls and/or look into sysfs to check if a particular interface has an ethernet encapsulation.

In particular, we are doing:
 * ioctl(s, SIOCGIWNAME, iface)
 * reading the contents of /sys/class/net/$IFACE_NAME/type
 * checking if /sys/class/net/$IFACE_NAME/phy80211 exists

Comment 3 Daniel Walsh 2011-09-22 15:16:14 UTC
Great, Miroslav add

dev_read_sysfs(sssd_t)

Comment 4 Miroslav Grepl 2011-09-26 09:34:55 UTC
Fixed in selinux-policy-3.9.16-41.fc15

Comment 5 Fedora Update System 2011-11-16 16:17:56 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 6 Fedora Update System 2011-11-17 23:36:16 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-12-04 02:36:12 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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