Bug 991593 - SELinux is preventing systemd-readahe from 'associate' accesses on the shared memory .
SELinux is preventing systemd-readahe from 'associate' accesses on the shared...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-02 16:16 EDT by Zero
Modified: 2015-02-17 11:31 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-17 11:31:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zero 2013-08-02 16:16:57 EDT
Description of problem:
SELinux is preventing systemd-readahe from 'associate' accesses on the shared memory .

*****  Plugin associate (99.5 confidence) suggests  **************************

If you want to change the label of  to readahead_t, you are not allowed to since it is not a valid file type.
Then you must pick a valid file label.
select a valid file type.  List valid file labels by executing: 
# seinfo -afile_type -x

*****  Plugin catchall (1.49 confidence) suggests  ***************************

If you believe that systemd-readahe should be allowed associate access on the  shm by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
allow this access for now by executing:
# grep systemd-readahe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:readahead_t:s0
Target Context                system_u:system_r:initrc_t:s0
Target Objects                 [ shm ]
Source                        systemd-readahe
Source Path                   systemd-readahe
Port                          <Neznámé>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-66.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.3-300.fc19.x86_64 #1 SMP Fri
                              Jul 26 00:00:58 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-08-02 22:15:03 CEST
Last Seen                     2013-08-02 22:15:03 CEST
Local ID                      93730c28-0698-4620-8eef-0b8608e9df3c

Raw Audit Messages
type=AVC msg=audit(1375474503.907:443): avc:  denied  { associate } for  pid=207 comm="systemd-readahe" key=839385323  scontext=system_u:system_r:readahead_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=shm

Hash: systemd-readahe,readahead_t,initrc_t,shm,associate

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.10.3-300.fc19.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-08-05 02:06:24 EDT
What does

# ps -eZ |grep initrc
Comment 2 Zero 2013-10-23 10:35:59 EDT
[zero@Zero ~]$ ps -eZ |grep initrc
system_u:system_r:initrc_t:s0    4439 ?        00:00:00 bumblebeed
Comment 3 Daniel Walsh 2013-10-24 13:48:10 EDT
What is bumblbeed and why would systemd-readahead be using it shared memory?
Comment 4 Zero 2013-10-25 10:30:44 EDT
(In reply to Daniel Walsh from comment #3)
> What is bumblbeed and why would systemd-readahead be using it shared memory?

Bumblebee is a effort to make Nvidia Optimus enabled laptops work in GNU/Linux systems. Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.I don't know why systemd-readahead used shared memory
Comment 5 Daniel Walsh 2013-10-28 16:37:35 EDT
Do the kernel guys have any ideas?
Comment 6 Eric Paris 2013-10-28 17:52:22 EDT
can you reproduce?  would you mind doing so with audit=1 on the kernel command line and attaching the results of running

ausearch -m AVC --ts recent

It'll give us at least a bit more info about the syscall systemd is making.  This permission check only happens if systemd-readahead called shmget with the same key returned when a process running as initrc_t called shmget.

We should remember this could well be a shared memory segment created by a short running systemd utility as opposed to the long running bumblebee process...
Comment 7 Eric Paris 2013-10-28 17:54:47 EDT
mind you I don't see a call to shmget anywhere in systemd source code...
Comment 8 Fedora End Of Life 2015-01-09 14:14:48 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 9 Fedora End Of Life 2015-02-17 11:31:52 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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