Bug 863678 - SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the directory /var/cache/man/cat1.
Summary: SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the direc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:137adf1bcc7d2b8266299376d99...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-06 15:27 UTC by Elad Alfassa
Modified: 2012-10-15 09:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-15 09:08:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: type (9 bytes, text/plain)
2012-10-06 15:27 UTC, Elad Alfassa
no flags Details
File: hashmarkername (14 bytes, text/plain)
2012-10-06 15:27 UTC, Elad Alfassa
no flags Details

Description Elad Alfassa 2012-10-06 15:27:39 UTC
Additional info:
libreport version: 2.0.14
kernel:         3.6.0-1.fc18.x86_64

description:
:SELinux is preventing /usr/sbin/tmpwatch from 'setattr' accesses on the directory /var/cache/man/cat1.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that tmpwatch should be allowed setattr access on the cat1 directory 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 tmpwatch /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:tmpreaper_t:s0-s0:c0.c1023
:Target Context                system_u:object_r:mandb_cache_t:s0
:Target Objects                /var/cache/man/cat1 [ dir ]
:Source                        tmpwatch
:Source Path                   /usr/sbin/tmpwatch
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           tmpwatch-2.11-2.fc18.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.11.1-32.fc18.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Permissive
:Host Name                     (removed)
:Platform                      Linux (removed) 3.6.0-1.fc18.x86_64 #1 SMP Mon Oct
:                              1 16:02:25 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    2012-10-06 17:26:42 IST
:Last Seen                     2012-10-06 17:26:42 IST
:Local ID                      630eac99-497a-440d-9d0c-d21833e4face
:
:Raw Audit Messages
:type=AVC msg=audit(1349537202.472:74): avc:  denied  { setattr } for  pid=9710 comm="tmpwatch" name="cat1" dev="sda6" ino=786896 scontext=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mandb_cache_t:s0 tclass=dir
:
:
:type=SYSCALL msg=audit(1349537202.472:74): arch=x86_64 syscall=utime success=yes exit=0 a0=404923 a1=7fff4ad77060 a2=15000 a3=8028 items=0 ppid=9706 pid=9710 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm=tmpwatch exe=/usr/sbin/tmpwatch subj=system_u:system_r:tmpreaper_t:s0-s0:c0.c1023 key=(null)
:
:Hash: tmpwatch,tmpreaper_t,mandb_cache_t,dir,setattr
:
:audit2allow
:
:#============= tmpreaper_t ==============
:allow tmpreaper_t mandb_cache_t:dir setattr;
:
:audit2allow -R
:
:#============= tmpreaper_t ==============
:allow tmpreaper_t mandb_cache_t:dir setattr;
:

Comment 1 Elad Alfassa 2012-10-06 15:27:43 UTC
Created attachment 622736 [details]
File: type

Comment 2 Elad Alfassa 2012-10-06 15:27:46 UTC
Created attachment 622737 [details]
File: hashmarkername

Comment 3 Miroslav Grepl 2012-10-08 08:09:52 UTC
Fixed in selinux-policy-3.11.1-33.fc18

Comment 4 Adam Williamson 2012-10-09 17:09:52 UTC
Wasn't doing anything directly to trigger this, appears to have happened in the background.

Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 5 Daniel Walsh 2012-10-09 18:20:55 UTC
Right there is new policy for mandb which labels /var/cache/man as mandb_cache_t but I guess tmpfiles needs to be able to list and delete content from this directory.

Comment 6 Fedora Update System 2012-10-11 09:03:53 UTC
selinux-policy-3.11.1-36.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-36.fc18

Comment 7 Fedora Update System 2012-10-11 17:22:28 UTC
Package selinux-policy-3.11.1-36.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-36.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-15934/selinux-policy-3.11.1-36.fc18
then log in and leave karma (feedback).

Comment 8 Jeff Bastian 2012-10-12 12:02:02 UTC
cron ran tmpwatch overnight and this error was waiting for me in the morning.

I see this director -- /var/cache/man/... -- in /etc/cron.daily/tmpwatch:

for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
    if [ -d "$d" ]; then
	/usr/sbin/tmpwatch "$flags" -f 30d "$d"
    fi
done


Package: (null)
OS Release: Fedora release 18 (Spherical Cow)

Comment 9 Daniel Walsh 2012-10-12 13:00:43 UTC
Have you installed the latest policy?

Comment 10 Jeff Bastian 2012-10-12 14:26:59 UTC
I just did, after seeing comment 7 above.  And I did an autorelabel just to be sure.

I then manually ran /etc/cron.daily/tmpwatch and it appeared to run fine: no new AVCs!

Thanks!


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