Bug 659651 - SELinux is preventing /bin/mailx from 'append' accesses on the file /var/lib/rkhunter/rkhcronlog.kZW4RM5ksJ.
Summary: SELinux is preventing /bin/mailx from 'append' accesses on the file /var/lib/...
Keywords:
Status: CLOSED DUPLICATE of bug 660544
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:7a37c5c1302...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-03 10:41 UTC by Frank Murphy
Modified: 2013-02-02 14:47 UTC (History)
20 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-07 11:11:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Frank Murphy 2010-12-03 10:41:53 UTC
SELinux is preventing /bin/mailx from 'append' accesses on the file /var/lib/rkhunter/rkhcronlog.kZW4RM5ksJ.

*****  Plugin restorecon (98.5 confidence) suggests  *************************

If you want to fix the label, rkhcronlog.kZW4RM5ksJ does not have the default system label.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/lib/rkhunter/rkhcronlog.kZW4RM5ksJ

*****  Plugin catchall (1.48 confidence) suggests  ***************************

If you believe that mailx should be allowed append access on the rkhcronlog.kZW4RM5ksJ 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 /bin/mailx /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

*****  Plugin leaks (1.48 confidence) suggests  ******************************

If you want to ignore mailx trying to append access the rkhcronlog.kZW4RM5ksJ file, because you believe it should not need this access.
Then you should report this as a bug.  
You can generate a local policy module to dontaudit this access.
Do
# grep /bin/mailx /var/log/audit/audit.log | audit2allow -D -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cron_var_lib_t:s0
Target Objects                /var/lib/rkhunter/rkhcronlog.kZW4RM5ksJ [ file ]
Source                        mail
Source Path                   /bin/mailx
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           mailx-12.5-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.10-4.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.36.1-10.fc15.x86_64 #1 SMP Mon Nov 29 14:41:22
                              UTC 2010 x86_64 x86_64
Alert Count                   2
First Seen                    Wed 01 Dec 2010 11:49:15 GMT
Last Seen                     Fri 03 Dec 2010 10:30:14 GMT
Local ID                      7c43e9d8-3337-4d83-b0cb-a06b52baab34

Raw Audit Messages
type=AVC msg=audit(1291372214.504:18): avc:  denied  { append } for  pid=7144 comm="mail" path="/var/lib/rkhunter/rkhcronlog.kZW4RM5ksJ" dev=dm-3 ino=921224 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_var_lib_t:s0 tclass=file

mail,system_mail_t,cron_var_lib_t,file,append
type=SYSCALL msg=audit(1291372214.504:18): arch=x86_64 syscall=execve success=yes exit=0 a0=15c5a50 a1=15cf7e0 a2=1208500 a3=8 items=0 ppid=10890 pid=7144 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=2 comm=mail exe=/bin/mailx subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)
mail,system_mail_t,cron_var_lib_t,file,append

#============= system_mail_t ==============
allow system_mail_t cron_var_lib_t:file append;

Comment 1 Frank Murphy 2010-12-03 12:37:01 UTC
This is rkhunter trying to send logs to root.
Which is what I want, it used to work without a "mypol" <=F14

Comment 2 Miroslav Grepl 2010-12-03 14:07:36 UTC
So now you have a local policy called mypol, which has a label for "/var/lib/rkhunter" directory?

If so, just add this access to your local policy.

Comment 3 Frank Murphy 2010-12-03 14:10:14 UTC
Just checking and making sure.

Comment 4 Miroslav Grepl 2010-12-07 11:11:39 UTC

*** This bug has been marked as a duplicate of bug 660544 ***

Comment 5 Michal Ambroz 2011-01-21 23:14:08 UTC
Hello - I had to add the policy for rkhunter as well.
Best regards
Michal Ambroz


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