AVC from sendmail & rkhunter

Steven Stern subscribed-lists at sterndata.com
Mon May 23 14:27:18 UTC 2011


rkhunter is unhappy with my system (due to tomboy and /dev/shrm) but
that's another story.

When sendmail tries to notify me that rkhunter is unhappy, it generates
and AVC:

SELinux is preventing /usr/sbin/sendmail.sendmail from getattr access on
the file /var/lib/rkhunter/rkhcronlog.bQnsKgU7Y1.

*****  Plugin restorecon (99.5 confidence) suggests
*************************

If you want to fix the label.
/var/lib/rkhunter/rkhcronlog.bQnsKgU7Y1 default label should be var_lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /var/lib/rkhunter/rkhcronlog.bQnsKgU7Y1

*****  Plugin catchall (1.49 confidence) suggests
***************************

If you believe that sendmail.sendmail should be allowed getattr access
on the rkhcronlog.bQnsKgU7Y1 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 sendmail /var/log/audit/audit.log | audit2allow -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.bQnsKgU7Y1 [
file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          sds-desk.sterndata.com
Source RPM Packages           sendmail-8.14.4-20.fc15
Target RPM Packages
Policy RPM                    selinux-policy-3.9.16-23.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     sds-desk.sterndata.com
Platform                      Linux sds-desk.sterndata.com
                              2.6.38.6-27.fc15.i686.PAE #1 SMP Sun May 15
                              17:39:47 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Mon 23 May 2011 03:38:43 AM CDT
Last Seen                     Mon 23 May 2011 03:38:43 AM CDT
Local ID                      08c592fa-5221-4f06-ac8a-025279784a19

Raw Audit Messages
type=AVC msg=audit(1306139923.297:1080): avc:  denied  { getattr } for
pid=954 comm="sendmail" path="/var/lib/rkhunter/rkhcronlog.bQnsKgU7Y1"
dev=dm-0 ino=656217
scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023
tcontext=system_u:object_r:cron_var_lib_t:s0 tclass=file


type=SYSCALL msg=audit(1306139923.297:1080): arch=i386 syscall=fstat64
success=yes exit=0 a0=1 a1=bf802f50 a2=48cff4 a3=3 items=0 ppid=1
pid=954 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=484 sgid=484
fsgid=484 tty=(none) ses=122 comm=sendmail
exe=/usr/sbin/sendmail.sendmail
subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)

Hash: sendmail,system_mail_t,cron_var_lib_t,file,getattr

audit2allow

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

audit2allow -R

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




-- 
-- Steve


More information about the users mailing list