RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 751558 - cannot view mail when unconfined is removed
Summary: cannot view mail when unconfined is removed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-05 13:23 UTC by Josh
Modified: 2012-06-20 12:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-20 12:28:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0780 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2012-06-19 20:34:59 UTC

Description Josh 2011-11-05 13:23:32 UTC
Description of problem:
running the mail program as root results in a permission denied and a AVC being generated

Version-Release number of selected component (if applicable):
3.7.19-123.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. semodule -r unconfined
2. mail
3.
  
Actual results:
able to view mail

Expected results:
permission denied

Additional info:

time->Sat Nov  5 09:22:31 2011
type=PATH msg=audit(1320499351.616:172488): item=1 name=(null) inode=14155777 dev=fd:00 mode=040550 ouid=0 ogid=0 rdev=00:00 obj=system_u:object_r:admin_home_t:s0
type=PATH msg=audit(1320499351.616:172488): item=0 name="/root/.mailrc"
type=CWD msg=audit(1320499351.616:172488):  cwd="/var/satellite/systemlogs"
type=SYSCALL msg=audit(1320499351.616:172488): arch=c000003e syscall=2 success=no exit=-13 a0=1a9cfc0 a1=0 a2=1b6 a3=fffffff8 items=2 ppid=10521 pid=12711 auid=1002 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts2 ses=854 comm="mail" exe="/bin/mailx" subj=staff_u:sysadm_r:user_mail_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1320499351.616:172488): avc:  denied  { search } for  pid=12711 comm="mail" name="root" dev=dm-0 ino=14155777 scontext=staff_u:sysadm_r:user_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:admin_home_t:s0 tclass=dir
----
time->Sat Nov  5 09:22:31 2011
type=PATH msg=audit(1320499351.616:172489): item=0 name="/var/mail/root"
type=CWD msg=audit(1320499351.616:172489):  cwd="/var/satellite/systemlogs"
type=SYSCALL msg=audit(1320499351.616:172489): arch=c000003e syscall=4 success=no exit=-13 a0=1a9cfe0 a1=7fff401fa3f0 a2=7fff401fa3f0 a3=7fff401fa140 items=1 ppid=10521 pid=12711 auid=1002 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts2 ses=854 comm="mail" exe="/bin/mailx" subj=staff_u:sysadm_r:user_mail_t:s0-s0:c0.c1023 key=(null)
type=AVC msg=audit(1320499351.616:172489): avc:  denied  { read } for  pid=12711 comm="mail" name="mail" dev=dm-0 ino=1836031 scontext=staff_u:sysadm_r:user_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mail_spool_t:s0 tclass=lnk_file

Comment 2 Miroslav Grepl 2011-11-07 09:42:06 UTC
Josh, thanks for using the policy without unconfined module. 

The note: You don't need to remove uncofined module, you can only disable this module using "semodule -d". 

So you could execute now

# semodule -i /usr/share/selinux/devel/targeted/unconfined.pp.bz2
# semodule -d unconfined.pp

Comment 3 Miroslav Grepl 2011-11-07 10:01:33 UTC
type=AVC msg=audit(1320499351.616:172489): avc:  denied  { read } for 
pid=12711 comm="mail" name="mail" dev=dm-0 ino=1836031
scontext=staff_u:sysadm_r:user_mail_t:s0-s0:c0.c1023
tcontext=system_u:object_r:mail_spool_t:s0 tclass=lnk_file

is allowed in Fedora. Will backport.

The question is /root/.mailrc. It looks like we could treat it with mail_home_t. Something like we have for .dead_letter

Comment 4 Josh 2011-11-07 12:02:41 UTC
(In reply to comment #2)
> Josh, thanks for using the policy without unconfined module. 
> 
> The note: You don't need to remove uncofined module, you can only disable this
> module using "semodule -d". 
> 
> So you could execute now
> 
> # semodule -i /usr/share/selinux/devel/targeted/unconfined.pp.bz2
> # semodule -d unconfined.pp

What are the trade-offs for disabling versus removing?

Thanks,
Josh

Comment 8 Michal Trunecka 2012-03-22 12:59:34 UTC
The bug should be fixed now, but we aren't able to reproduce the bug even with older selinux-policy. Josh, could you please install the current selinux-policy and confirm the bug is really fixed. (the newest version is 3.7.19-143 and can be downloaded from here: http://people.redhat.com/dwalsh/SELinux/RHEL6/noarch/ )

Comment 10 errata-xmlrpc 2012-06-20 12:28:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0780.html


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