Bug 312581 - SELinux is preventing /usr/sbin/logrotate (logrotate_t) "getattr" to /var/log/rpmpkgs (root_t).
SELinux is preventing /usr/sbin/logrotate (logrotate_t) "getattr" to /var/log...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
8
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-29 16:51 EDT by Matthew Saltzman
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-01 15:47:32 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 Matthew Saltzman 2007-09-29 16:51:10 EDT
Description of problem:
SELinux denied access requested by /usr/sbin/logrotate. It is not expected that
this access is required by /usr/sbin/logrotate 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.

Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.0.8-14.fc8.noarch

How reproducible:
Always

Steps to Reproduce:
1. /etc/cron.daily/logrotate
2.
3.
  
Actual results:
AVC

Expected results:
no AVC

Additional info:
Source Context:  system_u:system_r:logrotate_t:s0
Target Context:  system_u:object_r:root_t:s0
Target Objects:  /var/log/rpmpkgs [ file ]
Affected RPM Packages:  logrotate-3.7.6-1.1.fc8 [application]
Policy RPM:  selinux-policy-3.0.8-14.fc8
Selinux Enabled:  True
Policy Type:  targeted
MLS Enabled:  True
Enforcing Mode:  Enforcing
Plugin Name:  plugins.catchall_file
Host Name:  valkyrie.localdomain
Platform:  Linux valkyrie.localdomain 2.6.23-0.213.rc8.git2.fc8 #1 SMP Thu Sep
27 22:47:16 EDT 2007 x86_64 x86_64
Alert Count:  2
First Seen:  Sat 29 Sep 2007 03:55:14 PM EDT
Last Seen:  Sat 29 Sep 2007 03:55:14 PM EDT
Local ID:  6fea02fb-b833-4b44-8812-571a8f6b8c66
Line Numbers:  
Raw Audit Messages :avc: denied { getattr } for comm=logrotate dev=dm-0 egid=0
euid=0 exe=/usr/sbin/logrotate exit=-13 fsgid=0 fsuid=0 gid=0 items=0
path=/var/log/rpmpkgs pid=3186 scontext=system_u:system_r:logrotate_t:s0 sgid=0
subj=system_u:system_r:logrotate_t:s0 suid=0 tclass=file
tcontext=system_u:object_r:root_t:s0 tty=(none) uid=0
Comment 1 Daniel Walsh 2007-10-01 15:47:32 EDT
This is a badly labeled file.  I have no idea how it got labeled root_t

restorecon -R -v /var/log 

Should fix the labeling.
Comment 2 Matthew Saltzman 2007-10-01 16:29:13 EDT
That did it.  But the incorrect labeling is still a mystery.  I certainly did
nothing I'm aware of to cause it.  And I saw another report on
fedora-selinux-list describing the same issue, so it's bound to recur.

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