Bug 624321 - SELinux is preventing /usr/sbin/ntpd "unix_read unix_write" access .
Summary: SELinux is preventing /usr/sbin/ntpd "unix_read unix_write" access .
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 13
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7319a833207...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-16 01:21 UTC by Rich
Modified: 2011-05-25 20:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 20:24:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rich 2010-08-16 01:21:54 UTC
Summary:

SELinux is preventing /usr/sbin/ntpd "unix_read unix_write" access .

Detailed Description:

SELinux denied access requested by ntpd. It is not expected that this access is
required by ntpd 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:ntpd_t:s0
Target Context                system_u:system_r:initrc_t:s0
Target Objects                None [ shm ]
Source                        ntpd
Source Path                   /usr/sbin/ntpd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           ntp-4.2.6p1-2.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-44.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.6-147.2.4.fc13.x86_64 #1 SMP
                              Fri Jul 23 17:14:44 UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Sun 15 Aug 2010 11:40:26 AM EDT
Last Seen                     Sun 15 Aug 2010 09:05:16 PM EDT
Local ID                      d0275c5b-a81f-4a90-8059-6946b8944d2a
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281920716.861:14): avc:  denied  { unix_read unix_write } for  pid=1560 comm="ntpd" key=1314148400  scontext=system_u:system_r:ntpd_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=shm

node=(removed) type=SYSCALL msg=audit(1281920716.861:14): arch=c000003e syscall=29 success=no exit=-13 a0=4e545030 a1=60 a2=380 a3=7fff71d1caa0 items=0 ppid=1 pid=1560 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="ntpd" exe="/usr/sbin/ntpd" subj=system_u:system_r:ntpd_t:s0 key=(null)



Hash String generated from  catchall,ntpd,ntpd_t,initrc_t,shm,unix_read,unix_write
audit2allow suggests:

#============= ntpd_t ==============
allow ntpd_t initrc_t:shm { unix_read unix_write };

Comment 1 Miroslav Grepl 2010-08-16 08:02:07 UTC
Which process is running as initrc_t?

# ps -ez | grep initrc

Comment 2 Rich 2010-08-17 17:38:40 UTC
ps -eZ |grep initrc

system_u:system_r:initrc_t:s0    1566 ttyS1    00:00:00 shm_splc2

Comment 3 Miroslav Grepl 2010-08-18 10:55:04 UTC
Rich,
could you try to execute

chcon -t ntpd_exec_t /usr/sbin/shm_splc2


Then restart the shmpps service and test it. 

Thanks.

Comment 4 Rich 2010-08-18 19:57:53 UTC
executed chcon -t ntpd_exec_t /usr/sbin/shm_splc2
restarted the shmpps service the same SELinux error occurred

ls -Z  /usr/sbin/shm_splc2
-rwxr-xr-x. root root system_u:object_r:ntpd_exec_t:s0 /usr/sbin/shm_splc2

Comment 5 Miroslav Grepl 2010-08-27 10:28:34 UTC
Ok and what is now output of 

# ps -eZ | grep shm_splc2

Comment 6 Rich 2010-08-28 02:08:32 UTC
 ps -eZ | grep shm_splc2
unconfined_u:system_r:initrc_t:s0 3122 pts/0   00:00:00 shm_splc2

Note: At this time shm_splc2 needs to be started with debug "-D" turned on or shm_splc2 dies shortly after starting it.

Comment 7 Miroslav Grepl 2010-10-07 12:10:06 UTC
Strange,  shm_splc2 should be running in the ntpd_t domain after chcon.

Could you try to execute these commands

# chcon -t ntpd_exec_t /usr/sbin/shm_splc2
# service shmpps restart
# ps -eZ | grep shm_splc2


Also what is your output of

# id -Z


Thanks.

Comment 8 Miroslav Grepl 2010-11-03 16:22:13 UTC
Any update?

Comment 9 Fedora Admin XMLRPC Client 2010-11-08 21:49:57 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora Admin XMLRPC Client 2010-11-08 21:51:29 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 11 Fedora Admin XMLRPC Client 2010-11-08 21:52:47 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.


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