Bug 704121 - SELinux is preventing ntpd (ntpd_t) "write" to nss (sssd_var_lib_t)
SELinux is preventing ntpd (ntpd_t) "write" to nss (sssd_var_lib_t)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.7
All Linux
medium Severity medium
: rc
: ---
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-12 04:24 EDT by Petr Šplíchal
Modified: 2016-05-31 21:41 EDT (History)
3 users (show)

See Also:
Fixed In Version: selinux-policy-2.4.6-306.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 05:20:20 EDT
Type: ---
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 Petr Šplíchal 2011-05-12 04:24:18 EDT
Description of problem:

When sssd is enabled, (re)starting ntpd results in AVC denial:

type=AVC msg=audit(1305187892.471:342): avc:  denied  { write }
for  pid=4192 comm="ntpd" name="nss" dev=dm-0 ino=5177826
scontext=root:system_r:ntpd_t:s0
tcontext=root:object_r:sssd_var_lib_t:s0 tclass=sock_file

type=SYSCALL msg=audit(1305187892.471:342): arch=80000016
syscall=102 success=no exit=-13 a0=3 a1=3ffffb6e510 a2=6e
a3=3ff00000001 items=0 ppid=1 pid=4192 auid=0 uid=0 gid=0 euid=0
suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=6 comm="ntpd"
exe="/usr/sbin/ntpd" subj=root:system_r:ntpd_t:s0 key=(null)

Version-Release number of selected component (if applicable):
sssd-1.2.1-39.el5
ntp-4.2.2p1-9.el5_4.1
authconfig-5.3.21-7.el5
selinux-policy-2.4.6-302.el5

Steps to Reproduce:
1. add "domains = local" to the [sssd] section of /etc/sssd/sssd.conf
2. uncomment [domain/local] section in the same config
3. authconfig --update --enablesssd
4. service ntpd restart

Additional info:
The actual socket file is /var/lib/sss/pipes/nss

# ls -lZ /var/lib/sss/pipes/
srw-rw-rw-  root root root:object_r:sssd_var_lib_t     nss
srw-rw-rw-  root root root:object_r:sssd_var_lib_t     pam
drwx------  root root system_u:object_r:sssd_var_lib_t private
Comment 1 Milos Malik 2011-05-12 04:30:26 EDT
Petr helped me to reproduce the scenario. First AVC appeared immediately. Second AVC appeared few seconds after.
----
time->Thu May 12 04:08:05 2011
type=SYSCALL msg=audit(1305187685.773:47): arch=80000016 syscall=102 success=no exit=-13 a0=3 a1=3ffffe6d540 a2=6e a3=3ff00000002 items=0 ppid=1 pid=26113 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1 comm="ntpd" exe="/sbin/ntpd" subj=root:system_r:ntpd_t:s0 key=(null)
type=AVC msg=audit(1305187685.773:47): avc:  denied  { write } for  pid=26113 comm="ntpd" name="nss" dev=dm-0 ino=5963923 scontext=root:system_r:ntpd_t:s0 tcontext=root:object_r:sssd_var_lib_t:s0 tclass=sock_file
----
time->Thu May 12 04:08:32 2011
type=SYSCALL msg=audit(1305187712.123:50): arch=80000016 syscall=102 success=no exit=-13 a0=3 a1=3ffff8af558 a2=6e a3=3ff00000002 items=0 ppid=26764 pid=26765 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="procmail" exe="/usr/bin/procmail" subj=system_u:system_r:procmail_t:s0 key=(null)
type=AVC msg=audit(1305187712.123:50): avc:  denied  { write } for  pid=26765 comm="procmail" name="nss" dev=dm-0 ino=5963923 scontext=system_u:system_r:procmail_t:s0 tcontext=root:object_r:sssd_var_lib_t:s0 tclass=sock_file
----
Comment 2 Miroslav Grepl 2011-05-12 12:12:24 EDT
Ok, we have this in RHEL6.
Comment 3 Miroslav Grepl 2011-05-19 11:31:39 EDT
Fixed in selinux-policy-2.4.6-306.el5
Comment 6 errata-xmlrpc 2011-07-21 05:20:20 EDT
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-1069.html
Comment 7 errata-xmlrpc 2011-07-21 07:56:49 EDT
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-1069.html

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