Bug 989148

Summary: SELinux is preventing /usr/bin/dbus-daemon from 'associate' accesses on the shared memory .
Product: [Fedora] Fedora Reporter: erwincas <erwincas>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, eparis, erwincas, mgrepl, sdsmall
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1f3a81ece012adf7a7059afdef6cf8fa74246d6392d0eff25d7209b7ec6cf048
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-18 14:02:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description erwincas 2013-07-27 22:45:18 UTC
Description of problem:
SELinux is preventing /usr/bin/dbus-daemon from 'associate' accesses on the shared memory .

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

If you want to change the label of  to system_dbusd_t, you are not allowed to since it is not a valid file type.
Then you must pick a valid file label.
Do
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 dbus-daemon 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.
Do
allow this access for now by executing:
# grep dbus-daemon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_dbusd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:initrc_t:s0
Target Objects                 [ shm ]
Source                        dbus-daemon
Source Path                   /usr/bin/dbus-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dbus-1.6.12-1.fc19.x86_64
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                   19
First Seen                    2013-07-27 10:40:43 CST
Last Seen                     2013-07-27 16:43:18 CST
Local ID                      ff904924-bec0-40d7-a65b-a20ac9a89f4d

Raw Audit Messages
type=AVC msg=audit(1374964998.381:456): avc:  denied  { associate } for  pid=502 comm="dbus-daemon" key=838933471  scontext=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:initrc_t:s0 tclass=shm


type=SYSCALL msg=audit(1374964998.381:456): arch=x86_64 syscall=shmget success=no exit=EACCES a0=32011bdf a1=0 a2=0 a3=14 items=0 ppid=1 pid=502 auid=4294967295 uid=81 gid=81 euid=81 suid=81 fsuid=81 egid=81 sgid=81 fsgid=81 ses=4294967295 tty=(none) comm=dbus-daemon exe=/usr/bin/dbus-daemon subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 key=(null)

Hash: dbus-daemon,system_dbusd_t,initrc_t,shm,associate

Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.10.3-300.fc19.x86_64
type:           libreport

Potential duplicate: bug 801537

Comment 1 Miroslav Grepl 2013-07-29 08:56:59 UTC
What process is running as initrc_t?

ps -eZ | grep initrc_t

Comment 2 Daniel Walsh 2013-07-29 18:07:48 UTC
ConsoleKit?

Comment 3 erwincas 2013-07-29 18:33:35 UTC
(In reply to Miroslav Grepl from comment #1)
> What process is running as initrc_t?
> 
> ps -eZ | grep initrc_t

system_u:system_r:initrc_t:s0     978 ?        00:00:00 esets_daemon
system_u:system_r:initrc_t:s0     980 ?        00:00:26 esets_daemon
system_u:system_r:initrc_t:s0     981 ?        00:00:00 esets_mac

Comment 4 Miroslav Grepl 2013-08-08 12:51:42 UTC
Where does esets_daemon come from?

Comment 5 erwincas 2013-08-08 16:42:10 UTC
(In reply to Miroslav Grepl from comment #4)
> Where does esets_daemon come from?

It comes from Eset Nod32 Antivirus for linux Ver 4.

Comment 6 Daniel Walsh 2013-08-09 12:40:48 UTC
Did anything break?

Comment 7 erwincas 2013-08-10 16:51:18 UTC
(In reply to Daniel Walsh from comment #6)
> Did anything break?

nothing, everything runs fine, just the messages at every startup.

Comment 8 Daniel Walsh 2013-08-28 15:55:22 UTC
What is weird here is system_dbusd_t only associates with its own shared memory.

sesearch -A -s system_dbusd_t -c shm
Found 1 semantic av rules:
   allow system_dbusd_t system_dbusd_t : shm { create destroy getattr setattr read write associate unix_read unix_write lock } ; 


According to policy anyways.

Comment 9 Stephen Smalley 2013-08-29 12:25:44 UTC
If shmget is called with a key that is not IPC_PRIVATE and the key already exists, then it can yield an identifier for a pre-existing segment created by another process.
Output of ipcs -m -p might be interesting, along with ps entries for the pids displayed in the ipcs output.

Comment 10 Fedora End Of Life 2015-01-09 22:13:47 UTC
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 11 Fedora End Of Life 2015-02-18 14:02:28 UTC
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
bug.

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