Bug 700330

Summary: SELinux is preventing /bin/chown "write" access on /var/lib/sss/pipes/nss.
Product: Red Hat Enterprise Linux 6 Reporter: Gowrishankar Rajaiyan <grajaiya>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Karel Srot <ksrot>
Severity: medium Docs Contact:
Priority: high    
Version: 6.1CC: borgan, dwalsh, kbanerje, ksrot, mmalik, sgallagh, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-92.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 12:28:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gowrishankar Rajaiyan 2011-04-28 07:28:51 UTC
Summary:

SELinux is preventing /bin/chown "write" access on /var/lib/sss/pipes/nss.

Detailed Description:

SELinux denied access requested by chown. It is not expected that this access is
required by chown and this access may signal an intrusion attempt. It is also
possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug
report.

Additional Information:

Source Context                system_u:system_r:namespace_init_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:sssd_var_lib_t:s0
Target Objects                /var/lib/sss/pipes/nss [ sock_file ]
Source                        chown
Source Path                   /bin/chown
Port                          <Unknown>
Host                          rhel61gui.redhat.com
Source RPM Packages           coreutils-8.4-13.el6
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-84.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     rhel61gui.redhat.com
Platform                      Linux rhel61gui.redhat.com
                              2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31
                              EDT 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 27 Apr 2011 02:47:14 PM IST
Last Seen                     Wed 27 Apr 2011 02:47:14 PM IST
Local ID                      e89eb461-5607-4652-9ce8-72c27f833599
Line Numbers                  

Raw Audit Messages            

node=rhel61gui.redhat.com type=AVC msg=audit(1303895834.299:58): avc:  denied  { write } for  pid=2253 comm="chown" name="nss" dev=dm-0 ino=1046660 scontext=system_u:system_r:namespace_init_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:sssd_var_lib_t:s0 tclass=sock_file

node=rhel61gui.redhat.com type=SYSCALL msg=audit(1303895834.299:58): arch=c000003e syscall=42 success=no exit=-111 a0=3 a1=7fff99fcb540 a2=6e a3=7fff99fcb130 items=0 ppid=2243 pid=2253 auid=500 uid=0 gid=501 euid=0 suid=0 fsuid=0 egid=501 sgid=501 fsgid=501 tty=(none) ses=5 comm="chown" exe="/bin/chown" subj=system_u:system_r:namespace_init_t:s0-s0:c0.c1023 key=(null)

Comment 2 Stephen Gallagher 2011-04-28 12:07:18 UTC
Gowrishankar, could you please identify what you were doing when you saw this SELinux issue?

/bin/chown should NOT have write access on /var/lib/sss/pipes/nss, as this file must be owned by root and maintained only by the SSSD. So it seems to me that this is likely a proper SELinux denial, unless I'm missing something.

Comment 3 Daniel Walsh 2011-04-28 12:27:31 UTC
This is caused by the getpw call in chown, which is trying to verify the UID/Username by talking to sssd.

It should be fixed in selinux-policy-3.7.19-92.el6

Which is the current 6.1 candidate.

Comment 7 errata-xmlrpc 2011-05-19 12:28:06 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-2011-0526.html