Bug 726303 - SELinux is preventing 72733A6D61696E20513A526567 from 'open' accesses on the file /var/log/ntpd.log.
Summary: SELinux is preventing 72733A6D61696E20513A526567 from 'open' accesses on the ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d30a3de29c9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-28 07:22 UTC by Stephen Bunn
Modified: 2011-09-07 00:17 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.9.16-38.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-07 00:17:59 UTC


Attachments (Terms of Use)

Description Stephen Bunn 2011-07-28 07:22:26 UTC
SELinux is preventing 72733A6D61696E20513A526567 from 'open' accesses on the file /var/log/ntpd.log.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that 72733A6D61696E20513A526567 should be allowed open access on the ntpd.log file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep 72733A6D61696E20513A526567 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:syslogd_t:s0
Target Context                system_u:object_r:ntpd_log_t:s0
Target Objects                /var/log/ntpd.log [ file ]
Source                        72733A6D61696E20513A526567
Source Path                   72733A6D61696E20513A526567
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-34.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.8-35.fc15.x86_64 #1 SMP Wed
                              Jul 6 13:58:54 UTC 2011 x86_64 x86_64
Alert Count                   7
First Seen                    Thu 28 Jul 2011 04:04:29 PM KST
Last Seen                     Thu 28 Jul 2011 04:04:36 PM KST
Local ID                      91ef6a74-73d9-40e1-9d5f-3f3655a0f007

Raw Audit Messages
type=AVC msg=audit(1311836676.361:80): avc:  denied  { open } for  pid=1215 comm=72733A6D61696E20513A526567 name="ntpd.log" dev=dm-1 ino=3146123 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:ntpd_log_t:s0 tclass=file


Hash: 72733A6D61696E20513A526567,syslogd_t,ntpd_log_t,file,open

audit2allow

#============= syslogd_t ==============
allow syslogd_t ntpd_log_t:file open;

audit2allow -R

#============= syslogd_t ==============
allow syslogd_t ntpd_log_t:file open;

Comment 1 Daniel Walsh 2011-07-29 13:58:10 UTC
Why is syslogd trying to open the ntpd log file?

Comment 2 Miroslav Grepl 2011-08-04 09:04:04 UTC
Tomas,
any idea?

Comment 3 Tomas Heinrich 2011-08-04 10:39:37 UTC
rsyslog should only access files it is configured to through /etc/rsyslog.conf and /etc/rsyslog.d/*. With the default configuration, it shouldn't touch this file, have you modified it in any way?

Comment 4 Stephen Bunn 2011-08-04 10:52:57 UTC
I added /etc/rsyslog.d/ntp.conf with the following contents:
# Filter messages from the ntp service and send to a separate log
:programname, isequal, "ntpd" /var/log/ntpd.log
& ~

A pretty reasonable request I think.

Comment 5 Miroslav Grepl 2011-08-04 14:21:14 UTC
# restorecon  -R -v /etc/rsyslog.d/ntp.conf

Comment 6 Stephen Bunn 2011-08-04 23:27:02 UTC
I disagree. The ABRT said to file this as a bug:

"If you believe that 72733A6D61696E20513A526567 should be allowed open access on
the ntpd.log file by default."

This should be allowed access by default. The purpose of a system logger is to write logs, typically in /var/log/.. so by default rsyslog should be able to write to any log in /var/log without selinux magic. This does not happen on an enterprise linux box. On our RHEL 6.1 machines we have not had any selinux issues with configuring rsyslog to write logs in /var/log, this only happens on Fedora. So I will concede, but I do think this is a bug. Thanks for looking into it.

Comment 7 Miroslav Grepl 2011-08-05 07:10:05 UTC
My fault, I was concerning on /etc/rsyslog.d/ntp.conf but the problem is with /var/log/ntpd.log

Comment 8 Miroslav Grepl 2011-08-05 07:13:37 UTC
Tomas?

Comment 9 Daniel Walsh 2011-08-05 14:59:07 UTC
Miroslav lets allow syslog to manage all log files.

Comment 10 Miroslav Grepl 2011-08-11 11:28:08 UTC
Fixed in selinux-policy-3.9.16-38.fc15

Comment 11 Fedora Update System 2011-08-11 20:38:52 UTC
selinux-policy-3.9.16-38.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-38.fc15

Comment 12 Fedora Update System 2011-08-12 18:19:31 UTC
Package selinux-policy-3.9.16-38.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-38.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-38.fc15
then log in and leave karma (feedback).

Comment 13 Fedora Update System 2011-09-07 00:16:30 UTC
selinux-policy-3.9.16-38.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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