Bug 594029

Summary: SELinux is preventing /usr/sbin/ntpd "read" access on hosts.
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 13CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:2033afdd72f28ac4bc6996fe731c98f64bf5e117a4cf2c7ea3d1b5cccbcf9233
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-20 13:49:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson 2010-05-20 11:49:05 UTC
Summary:

SELinux is preventing /usr/sbin/ntpd "read" access on hosts.

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                unconfined_u:object_r:user_home_t:s0
Target Objects                hosts [ file ]
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-15.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux (removed) 2.6.33.4-95.fc13.x86_64 #1
                              SMP Thu May 13 05:16:23 UTC 2010 x86_64 x86_64
Alert Count                   45
First Seen                    Wed 19 May 2010 10:56:08 PM PDT
Last Seen                     Wed 19 May 2010 11:07:32 PM PDT
Local ID                      f69eb3b2-45f8-4b26-a936-aa13082e73e8
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1274335652.645:27): avc:  denied  { read } for  pid=1640 comm="ntpd" name="hosts" dev=md127p5 ino=524491 scontext=system_u:system_r:ntpd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1274335652.645:27): arch=c000003e syscall=2 success=no exit=-13 a0=7faff48582a6 a1=80000 a2=1b6 a3=0 items=0 ppid=1632 pid=1640 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,user_home_t,file,read
audit2allow suggests:

#============= ntpd_t ==============
allow ntpd_t user_home_t:file read;

Comment 1 Adam Williamson 2010-05-20 11:50:49 UTC
This is on current F13 with updates-testing packages.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Daniel Walsh 2010-05-20 13:49:23 UTC
Your hosts file has a label of a user homedir.

restorecon -R -v /etc

Should fix.