Bug 490024 - nscd_t needs search permissions on sbin_t
Summary: nscd_t needs search permissions on sbin_t
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 490010
TreeView+ depends on / blocked
 
Reported: 2009-03-12 21:09 UTC by Jeff Bastian
Modified: 2012-10-15 13:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 07:58:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1242 0 normal SHIPPED_LIVE selinux-policy bug fix update 2009-09-01 08:32:34 UTC

Description Jeff Bastian 2009-03-12 21:09:50 UTC
Description of problem:
Currently nscd restarts itself, if in paranoia mode, by running
  execv ("/proc/self/exe", argv);

Bug 490010 is about changing this to (essentially)
  bytes = readlink("/proc/self/exe", target, 255);
  target[bytes] = '\0';
  execv (target, argv);

On RHEL 5.3, target is /usr/sbin/nscd

SELinux policy blocks this from running.  The error is
type=AVC msg=audit(1236889747.325:55): avc:  denied  { search } for  pid=10495 comm="nscd" name="sbin" dev=dm-0 ino=2352438 scontext=root:system_r:nscd_t:s0 tcontext=system_u:object_r:sbin_t:s0 tclass=dir

A one line addition to the policy fixes the problem
  allow nscd_t sbin_t:dir { search } ;


Version-Release number of selected component (if applicable):
selinux-policy-2.4.6-203.el5.noarch
selinux-policy-targeted-2.4.6-203.el5.noarch

How reproducible:
every time

Steps to Reproduce:
1. patch glibc as shown in bug 490010
2. start nscd in paranoia mode with a short timeout of 30 seconds
  
Actual results:
Within 30 seconds if starting nscd, nscd fails to restart itself and the above error appears in /var/log/audit.log

Expected results:
nscd restarts itself

Additional info:

Comment 1 Daniel Walsh 2009-03-13 17:35:40 UTC
Fixed in selinux-policy-2.4.6-218.el5
Preview to U4 policy is available on 
http://people.redhat.com/dwalsh/SElinux/RHEL5

Comment 8 errata-xmlrpc 2009-09-02 07:58:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1242.html


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