Bug 1159672 - SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses on the file /dev/shm/spice.2372.
Summary: SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard: abrt_hash:7a429a587efdfbced4741ecc7cd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-03 01:06 UTC by Michael Hampton
Modified: 2015-01-30 23:55 UTC (History)
19 users (show)

Fixed In Version: selinux-policy-3.13.1-105.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-30 23:55:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Hampton 2014-11-03 01:06:54 UTC
Description of problem:
SELinux is preventing /usr/lib/systemd/systemd-logind from 'getattr' accesses on the file /dev/shm/spice.2372.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-logind should be allowed getattr access on the spice.2372 file 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 systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:svirt_tmpfs_t:s0
Target Objects                /dev/shm/spice.2372 [ file ]
Source                        systemd-logind
Source Path                   /usr/lib/systemd/systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-216-5.fc21.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-92.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.17.2-300.fc21.x86_64 #1 SMP Thu
                              Oct 30 19:23:48 UTC 2014 x86_64 x86_64
Alert Count                   2
First Seen                    2014-11-02 20:04:31 EST
Last Seen                     2014-11-02 20:04:48 EST
Local ID                      3626ac9d-7bbc-47c0-9d22-7effa29424a0

Raw Audit Messages
type=AVC msg=audit(1414976688.625:425): avc:  denied  { getattr } for  pid=1295 comm="systemd-logind" path="/dev/shm/spice.2372" dev="tmpfs" ino=27522 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:svirt_tmpfs_t:s0 tclass=file permissive=0


type=SYSCALL msg=audit(1414976688.625:425): arch=x86_64 syscall=newfstatat success=no exit=EACCES a0=16 a1=7fdb3e36c02b a2=7fff03ba8570 a3=100 items=0 ppid=1 pid=1295 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-logind exe=/usr/lib/systemd/systemd-logind subj=system_u:system_r:systemd_logind_t:s0 key=(null)

Hash: systemd-logind,systemd_logind_t,svirt_tmpfs_t,file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-92.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.2-300.fc21.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2014-11-03 10:48:42 UTC
Why systemd-logind want getattr on /dev/shm/spice.*? 
Thank you.

Comment 2 Major Hayden 🤠 2014-12-01 15:41:00 UTC
I'm having the same issue:

type=AVC msg=audit(1417441202.817:39907): avc:  denied  { getattr } for  pid=1249 comm="systemd-logind" path="/dev/shm/spice.8885" dev="tmpfs" ino=221317 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:svirt_tmpfs_t:s0 tclass=file permissive=1

Suggested policy fix:

# grep 1417441202.817:39907 /var/log/audit/audit.log | audit2allow

#============= systemd_logind_t ==============
allow systemd_logind_t svirt_tmpfs_t:file getattr;

Relevant package versions:

selinux-policy-3.13.1-92.fc21.noarch
kernel-core-3.17.3-300.fc21.x86_64
selinux-policy-targeted-3.13.1-92.fc21.noarch

Comment 3 Lennart Poettering 2014-12-09 02:10:06 UTC
(In reply to Lukas Vrabec from comment #1)
> Why systemd-logind want getattr on /dev/shm/spice.*? 
> Thank you.

logind now removes POSIX SHM segments of all users that log out. This is configured via the RemoveIPC= option in logind.conf.

Comment 4 Michael DePaulo 2014-12-11 13:08:55 UTC
Description of problem:
I upgraded from F20 to F21 using FedUp.
Using Virt-Manager, I then powered on 2 existing VMs that both have "Display Spice", "Channel spice", and "Video XQL".

Version-Release number of selected component:
selinux-policy-3.13.1-99.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.4-301.fc21.x86_64
type:           libreport

Comment 5 Robert Hancock 2014-12-15 17:51:49 UTC
Description of problem:
Not sure what is causing this. This is after a fedup upgrade from Fedora 20.

Version-Release number of selected component:
selinux-policy-3.13.1-99.fc21.noarch

Additional info:
reporter:       libreport-2.3.0
hashmarkername: setroubleshoot
kernel:         3.17.6-300.fc21.x86_64
type:           libreport

Comment 6 Daniel Walsh 2015-01-02 16:45:03 UTC
6c7903f1ef132fdaaae089a1385b5b72c9ed1d0b allows this in git.

Comment 7 Fedora Update System 2015-01-27 16:50:00 UTC
selinux-policy-3.13.1-105.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/selinux-policy-3.13.1-105.fc21

Comment 8 Fedora Update System 2015-01-30 04:32:52 UTC
Package selinux-policy-3.13.1-105.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.13.1-105.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-1337/selinux-policy-3.13.1-105.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-01-30 23:55:20 UTC
selinux-policy-3.13.1-105.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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