Hide Forgot
Description of problem: SELinux is preventing /usr/bin/mailx from 'append' accesses on the file /var/lib/rkhunter/rkhcronlog.Vh1zTNeQ2T. ***** Plugin restorecon (93.9 confidence) suggests ************************ If you want to fix the label. /var/lib/rkhunter/rkhcronlog.Vh1zTNeQ2T default label should be var_lib_t. Then you can run restorecon. Do # /sbin/restorecon -v /var/lib/rkhunter/rkhcronlog.Vh1zTNeQ2T ***** Plugin leaks (6.10 confidence) suggests ***************************** If you want to ignore mailx trying to append access the rkhcronlog.Vh1zTNeQ2T 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 /usr/bin/mailx /var/log/audit/audit.log | audit2allow -D -M mypol # semodule -i mypol.pp ***** Plugin catchall (1.43 confidence) suggests ************************** If you believe that mailx should be allowed append access on the rkhcronlog.Vh1zTNeQ2T 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 mail /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.Vh1zTNeQ2T [ file ] Source mail Source Path /usr/bin/mailx Port <Unknown> Host (removed) Source RPM Packages mailx-12.5-10.fc20.x86_64 Target RPM Packages Policy RPM selinux-policy-3.12.1-106.fc20.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 Alert Count 1 First Seen 2013-12-20 10:36:56 CET Last Seen 2013-12-20 10:36:56 CET Local ID ac2b44dd-32cd-47e2-8d45-5bcd4aff56ea Raw Audit Messages type=AVC msg=audit(1387532216.307:163): avc: denied { append } for pid=16342 comm="mail" path="/var/lib/rkhunter/rkhcronlog.Vh1zTNeQ2T" dev="dm-2" ino=2621723 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(1387532216.307:163): arch=x86_64 syscall=execve success=yes exit=0 a0=27cec00 a1=27572b0 a2=2423a60 a3=8 items=0 ppid=1067 pid=16342 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=2 tty=(none) comm=mail exe=/usr/bin/mailx subj=system_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null) Hash: mail,system_mail_t,cron_var_lib_t,file,append Additional info: reporter: libreport-2.1.10 hashmarkername: setroubleshoot kernel: 3.11.10-301.fc20.x86_64 type: libreport Potential duplicate: bug 659651
We need to add a label for rkhunter and then all domains append to it, and allow cron to create it. rkhunter_var_lib_t.
AFAIK there was a fix in rkhunter pkg.
The "fix" is to NOT use the MAIL-ON-WARNING option. Orig reporter: are you using that setting? If it's not set does it work as expected? ie, MAIL-ON-WARNING=""
(In reply to Kevin Fenzi from comment #3) > The "fix" is to NOT use the MAIL-ON-WARNING option. However /etc/rkhunter.conf says: "# NOTE: This option [i.e. MAIL-ON-WARNING] should be present in the configuration file." > Orig reporter: are you using that setting? If it's not set does it work as > expected? I did in the time of the AVC. However, I stopped since that and it "works" as expected, thought I am not alarmed when rkhunter finds something..
(In reply to Michal Nowak from comment #4) > (In reply to Kevin Fenzi from comment #3) > > The "fix" is to NOT use the MAIL-ON-WARNING option. > > However /etc/rkhunter.conf says: "# NOTE: This option [i.e. MAIL-ON-WARNING] > should be present in the configuration file." Yeah, thats why I said: MAIL-ON-WARNING="" > > > Orig reporter: are you using that setting? If it's not set does it work as > > expected? > > I did in the time of the AVC. However, I stopped since that and it "works" > as expected, thought I am not alarmed when rkhunter finds something.. Hopefully upstream will drop this option entirely in the next version... ;(
(In reply to Kevin Fenzi from comment #5) > Yeah, thats why I said: > > MAIL-ON-WARNING="" That seems to work for me, thanks.
I'll try again to get upstream to drop this option entirely. It's already defaulted to "" in our config.