Bug 613551 - Aisexec cannot mmap and unlink file in /dev/shm and /var/run
Summary: Aisexec cannot mmap and unlink file in /dev/shm and /var/run
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 5.6
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 561546 626910
TreeView+ depends on / blocked
 
Reported: 2010-07-12 09:00 UTC by Jan Friesse
Modified: 2018-11-14 19:40 UTC (History)
3 users (show)

(edit)
Recently, the OpenAIS Standards-Based Cluster Framework, an open implementation of the Application Interface Specification (AIS), started using POSIX semaphores instead of the SysV semaphores. With this update, relevant SELinux rules have been adjusted to reflect this change.
Clone Of:
(edit)
Last Closed: 2011-01-13 21:49:53 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0026 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-01-12 16:11:15 UTC

Comment 1 Steven Dake 2010-07-12 16:47:22 UTC
Honza,

/var/run won't be a supported operation in rhel5.6 and can be removed from the
openais work in progress patch.

As a result, /dev/shm is the only thing selinux must be concerned with.

Comment 2 Daniel Walsh 2010-07-12 17:39:07 UTC
Steven /dev/shm should be labeled tmpfs_t?  This looks like something is mislabeled?

Comment 3 Steven Dake 2010-07-12 17:46:49 UTC
Dan,

Not entirely sure - Honza (jfriesse) ran the tests.  It is possible his system is not labeled properly.  He should be able to provide more information on the topic.

Comment 4 Jan Friesse 2010-07-13 07:47:36 UTC
(In reply to comment #2)
> Steven /dev/shm should be labeled tmpfs_t?  This looks like something is
> mislabeled?    

Dan,
it looks like (maybe) bug in selinux:

- I've ran restorecon -RvF / (to make sure that my compiled binaries have right context)

ls -ladZ /dev/shm
drwxrwxrwt  root root system_u:object_r:device_t       /dev/shm

- After computer reboot (I didn't reboot it before)

ls -ladZ /dev/shm
drwxrwxrwt  root root system_u:object_r:tmpfs_t        /dev/shm
- It's fully updated RHEL 5.5
- rpm -qa selinux*
selinux-policy-targeted-2.4.6-279.el5
selinux-policy-2.4.6-279.el5
selinux-policy-devel-2.4.6-279.el5
- getenforce
Enforcing

But back to the openais problem. It looks like simple reboot solved main problem, but unlink problem is still there:

type=AVC msg=audit(1279007167.111:29): avc:  denied  { unlink } for  pid=3610 comm="aisexec" name="openais_shm-TzIxst" dev=tmpfs ino=14559 scontext=root:system_r:aisexec_t:s0 tcontext=root:object_r:tmpfs_t:s0 tclass=file

Comment 5 Miroslav Grepl 2010-07-13 14:26:23 UTC
We are working on it with Jan.

Comment 6 Miroslav Grepl 2010-09-09 14:11:25 UTC
Jan,
could you test it with

selinux-policy-2.4.6-283.el5
selinux-policy-targeted-2.4.6-283.el5

packages.

Comment 7 Steven Dake 2010-09-09 16:17:40 UTC
Miroslav,

We moved the openais_shm* bug fix out to rhel 5.7 because of 5.6 capacity constraints.  My apologies for being unaware of this bug and recommending it for 5.7 rather then 5.6.

Comment 10 Jaromir Hradilek 2011-01-05 16:17:02 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Recently, the OpenAIS Standards-Based Cluster Framework, an open implementation of the Application Interface Specification (AIS), started using POSIX semaphores instead of the SysV semaphores. With this update, relevant SELinux rules have been adjusted to reflect this change.

Comment 12 errata-xmlrpc 2011-01-13 21:49:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0026.html


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