Bug 1007808 - SELinux prevents nslcd access to sysfs_t files
Summary: SELinux prevents nslcd access to sysfs_t files
Keywords:
Status: CLOSED DUPLICATE of bug 1005250
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.5
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-13 11:06 UTC by Ondrej Moriš
Modified: 2014-12-12 11:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-13 11:16:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ondrej Moriš 2013-09-13 11:06:09 UTC
Description of problem:

This problems occurs on i386 architecture only. Tool nslcd from nss-pam-ldapd tries to access /sys/devices/system/cpu/online which has secontext system_u:object_r:sysfs_t:s0 and the access is forbidden.

Version-Release number of selected component (if applicable):

selinux-policy-3.7.19-212.el6.noarch

How reproducible:

100% (on i386 only)

Steps to Reproduce:

1. Start nslcd (service nslcd start)
2. See /v/r/a/audit.log

Actual results:

type=AVC msg=audit(1379070099.317:54): avc:  denied  { search } for  pid=3409 comm="nslcd" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir
type=AVC msg=audit(1379070099.317:56): avc:  denied  { search } for  pid=3411 comm="nslcd" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir
type=AVC msg=audit(1379070099.317:55): avc:  denied  { search } for  pid=3410 comm="nslcd" name="/" dev=sysfs ino=1 scontext=unconfined_u:system_r:nslcd_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir
type=SYSCALL msg=audit(1379070099.317:54): arch=40000003 syscall=5 success=no exit=-13 a0=b22c00 a1=80000 a2=0 a3=15c items=0 ppid=1 pid=3409 auid=0 uid=65 gid=55 euid=65 suid=65 fsuid=65 egid=55 sgid=55 fsgid=55 tty=(none) ses=1 comm="nslcd" exe="/usr/sbin/nslcd" subj=unconfined_u:system_r:nslcd_t:s0 key=(null)
type=SYSCALL msg=audit(1379070099.317:56): arch=40000003 syscall=5 success=no exit=-13 a0=b22c00 a1=80000 a2=0 a3=15c items=0 ppid=1 pid=3411 auid=0 uid=65 gid=55 euid=65 suid=65 fsuid=65 egid=55 sgid=55 fsgid=55 tty=(none) ses=1 comm="nslcd" exe="/usr/sbin/nslcd" subj=unconfined_u:system_r:nslcd_t:s0 key=(null)
type=SYSCALL msg=audit(1379070099.317:55): arch=40000003 syscall=5 success=no exit=-13 a0=b22c00 a1=80000 a2=0 a3=15c items=0 ppid=1 pid=3410 auid=0 uid=65 gid=55 euid=65 suid=65 fsuid=65 egid=55 sgid=55 fsgid=55 tty=(none) ses=1 comm="nslcd" exe="/usr/sbin/nslcd" subj=unconfined_u:system_r:nslcd_t:s0 key=(null)

But nslcd is started successfully (and works fine).

Expected results:

No AVC.

Additional info:

Audit2allow says: allow nslcd_t sysfs_t:dir search;

I am not sure if nslcd does not access aforementioned file on other architectures or if selinux-policy somehow handles it there.

Comment 1 Milos Malik 2013-09-13 11:10:32 UTC
I believe this bug is a duplicate of bz#1005250.

Comment 2 Ondrej Moriš 2013-09-13 11:16:49 UTC
You're right Milos, thanks.

*** This bug has been marked as a duplicate of bug 1005250 ***


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