Bug 661670 - SELinux is preventing /bin/mailx "append" access to /var/lib/rkhunter/rkhcronlog.a1y37sws2u.
Summary: SELinux is preventing /bin/mailx "append" access to /var/lib/rkhunter/rkhcron...
Keywords:
Status: CLOSED DUPLICATE of bug 660544
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-09 10:51 UTC by rvcsaba
Modified: 2010-12-09 11:29 UTC (History)
2 users (show)

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


Attachments (Terms of Use)

Description rvcsaba 2010-12-09 10:51:30 UTC
Summary:

SELinux is preventing /bin/mailx "append" access to
/var/lib/rkhunter/rkhcronlog.a1y37sws2u.

Detailed Description:

[mail has a permissive type (system_mail_t). This access was not denied.]

SELinux denied access requested by mail. /var/lib/rkhunter/rkhcronlog.a1y37sws2u
may be a mislabeled. /var/lib/rkhunter/rkhcronlog.a1y37sws2u default SELinux
type is var_lib_t, but its current type is cron_var_lib_t. Changing this file
back to the default type, may fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creating a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report against this package.

Allowing Access:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/var/lib/rkhunter/rkhcronlog.a1y37sws2u', if
this file is a directory, you can recursively restore using restorecon -R
'/var/lib/rkhunter/rkhcronlog.a1y37sws2u'.

Fix Command:

/sbin/restorecon '/var/lib/rkhunter/rkhcronlog.a1y37sws2u'

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.a1y37sws2u [ file ]
Source                        mail
Source Path                   /bin/mailx
Port                          <Unknown>
Host                          deer
Source RPM Packages           mailx-12.5-1.fc14
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-15.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     deer
Platform                      Linux deer 2.6.35.9-64.fc14.x86_64 #1 SMP Fri Dec
                              3 12:19:41 UTC 2010 x86_64 x86_64
Alert Count                   1
First Seen                    Thu 09 Dec 2010 11:38:52 AM CET
Last Seen                     Thu 09 Dec 2010 11:38:52 AM CET
Local ID                      200180c0-6c0a-4a5d-801c-5000be3fbfca
Line Numbers                  

Raw Audit Messages            

node=deer type=AVC msg=audit(1291891132.728:40808): avc:  denied  { append } for  pid=31481 comm="mail" path="/var/lib/rkhunter/rkhcronlog.a1y37sws2u" dev=dm-0 ino=144 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:cron_var_lib_t:s0 tclass=file

node=deer type=SYSCALL msg=audit(1291891132.728:40808): arch=c000003e syscall=59 success=yes exit=0 a0=1b82d40 a1=1c07450 a2=183e500 a3=8 items=0 ppid=30403 pid=31481 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)

------------------------------

rkhunter sent log mail, but SELinux warning.

Comment 1 Miroslav Grepl 2010-12-09 11:29:47 UTC

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


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