Bug 613551 - Aisexec cannot mmap and unlink file in /dev/shm and /var/run
Aisexec cannot mmap and unlink file in /dev/shm and /var/run
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy (Show other bugs)
5.5
All Linux
medium Severity medium
: rc
: 5.6
Assigned To: Miroslav Grepl
Milos Malik
:
Depends On:
Blocks: 561546 626910
  Show dependency treegraph
 
Reported: 2010-07-12 05:00 EDT by Jan Friesse
Modified: 2016-04-26 10:19 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 16:49:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Comment 1 Steven Dake 2010-07-12 12:47:22 EDT
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 13:39:07 EDT
Steven /dev/shm should be labeled tmpfs_t?  This looks like something is mislabeled?
Comment 3 Steven Dake 2010-07-12 13:46:49 EDT
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 03:47:36 EDT
(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 10:26:23 EDT
We are working on it with Jan.
Comment 6 Miroslav Grepl 2010-09-09 10:11:25 EDT
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 12:17:40 EDT
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 11:17:02 EST
    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 16:49:53 EST
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.