Bug 1007808 - SELinux prevents nslcd access to sysfs_t files
SELinux prevents nslcd access to sysfs_t files
Status: CLOSED DUPLICATE of bug 1005250
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy (Show other bugs)
6.5
All Linux
unspecified Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-13 07:06 EDT by Ondrej Moriš
Modified: 2014-12-12 06:12 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-13 07:16:49 EDT
Type: Bug
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 Ondrej Moriš 2013-09-13 07:06:09 EDT
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 07:10:32 EDT
I believe this bug is a duplicate of bz#1005250.
Comment 2 Ondrej Moriš 2013-09-13 07:16:49 EDT
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.