Bug 205876 - "AVC" denial of "nscd"
Summary: "AVC" denial of "nscd"
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: shadow-utils
Version: 5.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Vrabec
QA Contact: David Lawrence
URL:
Whiteboard:
: 206519 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-09 10:25 UTC by Joachim Frieben
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-04 11:54:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
"audit" log file for "RHEL5 beta 1" (23.97 KB, text/plain)
2006-09-10 12:03 UTC, Joachim Frieben
no flags Details
"SELinux Alert" screenshot for "RHEL5 beta 1" (61.28 KB, image/png)
2006-09-10 12:04 UTC, Joachim Frieben
no flags Details
strace -fo log rpm -i nfs-utils-1.0.9-7.fc6.i386.rpm (600.96 KB, text/plain)
2006-09-22 12:45 UTC, Peter Vrabec
no flags Details

Description Joachim Frieben 2006-09-09 10:25:57 UTC
Description of problem:
SELinux denied ['write'] access for the file (/etc/group) requested by
/usr/sbin/nscd.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-2.3.3-22

How reproducible:
Unknown

Steps to Reproduce:
1. Install a bunch of packages via "pirut".
  
Actual results:
"AVC" denial icon pops up in the notification area.

Expected results:
Access rights get granted as requested.

Additional info:
Target Object:        /etc/group
Affected RPMs:        nscd-2.4.90-22
Existing Bug Reports: coming soon
Policy RPM:           selinux-policy-2.3.3-22
Selinux Enabled:      True
Policy Type:          targeted
MLS Enabled:          True
Enforcing Mode:       Permissive

Comment 1 Daniel Walsh 2006-09-09 11:06:55 UTC
Could you attach the avc messages from /var/log/audit/audit.log

Comment 2 Joachim Frieben 2006-09-09 13:20:01 UTC
Sorry, but I have already hopped back to "rawhide". This channel
thing seems to have changed with respect to "RHEL4 beta X", not
obvious if one gets updates or not ... repodata broken, etc.
Btw, what I have posted above is copied 100% from the notification
applet. I will give "RHEL 5 beta1" another try in "QEMU" and post
the result .. a little patience, please.

Comment 3 Joachim Frieben 2006-09-10 12:03:06 UTC
Created attachment 135921 [details]
"audit" log file for "RHEL5 beta 1"

Comment 4 Joachim Frieben 2006-09-10 12:04:15 UTC
Created attachment 135922 [details]
"SELinux Alert" screenshot for "RHEL5 beta 1"

Comment 5 Daniel Walsh 2006-09-18 16:33:13 UTC
This is caused by a leaked file descriptor in groupadd.  Basically all file
descriptos have to be closed on exec, or the execed application will have access
to the file descriptors.

fcntl(fd, F_SETFD, FD_CLOEXEC)

The kernel is noticing the open file descriptor when it tries to exec the nscd
application, it then checks what access nscd has and triggers this avc message.


Comment 7 Peter Vrabec 2006-09-21 12:51:56 UTC
*** Bug 206519 has been marked as a duplicate of this bug. ***

Comment 8 Peter Vrabec 2006-09-21 12:59:58 UTC
I can't reproduce it. I have tried user{add,del} group{add,del,mod} for many times without any 
success. I have also tried several firstboots (#206519)

# service auditd status
auditd (pid 1597) is running...
# service nscd status
nscd (pid 2470) is running...

# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted

# rpm -q selinux-policy-targeted
selinux-policy-targeted-2.3.14-6


Comment 9 Daniel Walsh 2006-09-21 13:26:23 UTC
You have nscd turned on?

This is happening when cron runs an RPM update that includes a groupadd/useradd
I believe.

Comment 10 Peter Vrabec 2006-09-21 14:09:38 UTC
Yes I have.

Comment 11 Peter Vrabec 2006-09-22 12:45:10 UTC
Created attachment 136940 [details]
strace -fo log rpm -i nfs-utils-1.0.9-7.fc6.i386.rpm

# egrep -e 'AVC|avc' /var/log/audit/audit.log
no avc messages in audit.log

Comment 12 Peter Vrabec 2006-10-04 11:54:10 UTC
I'm closing this issue, since I'm not able to reproduce it with latest shadow-utils-4.0.17-5. If this 
problem occurs again, feel free to reopen it.




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