Bug 1259985 - SELinux is preventing spice-vdagent from 'getattr' accesses on the chr_file /dev/vport1p1.
SELinux is preventing spice-vdagent from 'getattr' accesses on the chr_file /...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
x86_64 Unspecified
medium Severity medium
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:f7c097f20594e933851db3904af...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-04 00:38 EDT by Joachim Frieben
Modified: 2016-05-25 09:05 EDT (History)
14 users (show)

See Also:
Fixed In Version: selinux-policy-3.13.1-158.12.fc23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-05 09:52:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Audit events after enabling permissive mode (17.40 KB, image/png)
2015-10-31 14:23 EDT, Mikhail Zabaluev
no flags Details

  None (edit)
Description Joachim Frieben 2015-09-04 00:38:49 EDT
Description of problem:
SELinux is preventing spice-vdagent from 'getattr' accesses on the chr_file /dev/vport1p1.

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

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

Additional Information:
Source Context                system_u:system_r:xdm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:virtio_device_t:s0
Target Objects                /dev/vport1p1 [ chr_file ]
Source                        spice-vdagent
Source Path                   spice-vdagent
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-146.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.0-1.fc23.x86_64 #1 SMP Mon Aug
                              31 15:57:27 UTC 2015 x86_64 x86_64
Alert Count                   18
First Seen                    2015-09-01 21:20:09 CEST
Last Seen                     2015-09-04 06:36:25 CEST
Local ID                      78c277f3-f720-422d-bb1c-b2f0c3a3f12a

Raw Audit Messages
type=AVC msg=audit(1441341385.298:500): avc:  denied  { getattr } for  pid=1486 comm="spice-vdagent" path="/dev/vport1p1" dev="devtmpfs" ino=10651 scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023 tcontext=system_u:object_r:virtio_device_t:s0 tclass=chr_file permissive=0


Hash: spice-vdagent,xdm_t,virtio_device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-3.13.1-146.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-1.fc23.x86_64
type:           libreport

Potential duplicate: bug 723287
Comment 1 cube00 2015-10-03 11:34:53 EDT
Description of problem:
Error during start up while running in Virtual Machine Manager.

Version-Release number of selected component:
selinux-policy-3.13.1-144.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.0-300.fc23.x86_64
type:           libreport
Comment 2 cube00 2015-10-03 12:21:02 EDT
Description of problem:
Previous report was for the package shipped in the 23-beta image. This one is from a system with all updates applied. After entering the user's password screen freezes grey. Need to use Ctrl+Alt+F2 and then a desktop appears (without logging in again) so this shows as tty2 screen :0.

Version-Release number of selected component:
selinux-policy-3.13.1-147.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.2-300.fc23.x86_64
type:           libreport
Comment 3 Miroslav Grepl 2015-10-13 04:22:29 EDT
Could you please test it with permissive mode to see if you get more AVCs.


# semanage permissive -a xdm_t

re-test

# semanage permissive -d xdm_t

# ausearch -m user_avc,avc -ts recent


Thank you.
Comment 4 Joachim Frieben 2015-10-13 12:02:06 EDT
For the time being, this issue cannot be investigated any further because troubleshooting SELinux does not work at the moment, see bug 1271061.
Comment 5 Giulio 'juliuxpigface' 2015-10-21 16:46:03 EDT
Description of problem:
It seems that I encounter this on every boot of a qemu-kvm guest which runs Fedora Workstation (Final RC2) x86_64.

Version-Release number of selected component:
selinux-policy-3.13.1-152.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.3-300.fc23.x86_64
type:           libreport
Comment 6 Adam Williamson 2015-10-21 19:52:10 EDT
Description of problem:
Appears in sealert after a fresh install and log in of Fedora 23 Final RC2 x86_64 Workstation live to a KVM (also was in TC11 and probably earlier builds too).

Version-Release number of selected component:
selinux-policy-3.13.1-152.fc23.noarch

Additional info:
reporter:       libreport-2.6.2
hashmarkername: setroubleshoot
kernel:         4.2.3-300.fc23.x86_64
type:           libreport
Comment 7 Adam Williamson 2015-10-21 19:55:41 EDT
Booting with enforcing=0 doesn't produce any more relevant AVCs - there's still this one, plus a bunch of:

time->Wed Oct 21 16:54:04 2015
type=USER_AVC msg=audit(1445471644.315:531): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='Unknown permission start for class system exe="/usr/lib/systemd/systemd" sauid=0 hostname=? addr=? terminal=?'

but that doesn't seem relevant to this.
Comment 8 Giulio 'juliuxpigface' 2015-10-29 17:24:12 EDT
Description of problem:
Found this after the login (Fedora 23 Final RC9 x86_64)

Version-Release number of selected component:
selinux-policy-3.13.1-152.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.3-300.fc23.x86_64
type:           libreport
Comment 9 Mikhail Zabaluev 2015-10-31 14:23 EDT
Created attachment 1088219 [details]
Audit events after enabling permissive mode
Comment 10 Mikhail Zabaluev 2015-10-31 14:25:40 EDT
(In reply to Miroslav Grepl from comment #3)
> Could you please test it with permissive mode to see if you get more AVCs.
> 
> 
> # semanage permissive -a xdm_t
> 
> re-test

Did exactly this. The events are still present, as seen in the attachment above.
Comment 11 Mikhail Zabaluev 2015-10-31 14:40:30 EDT
In my case, the system does not boot to GDM, and gnome-session keeps failing with "failed to dispatch Wayland events: Broken pipe". I don't know whether this may be caused by the SELinux problem with spice-vdagent.
Comment 12 Joachim Frieben 2015-12-10 11:53:39 EST
Issue still present for selinux-policy-targeted-3.13.1-155.fc23.
Comment 13 Joachim Frieben 2016-03-24 16:03:28 EDT
Issue still present for selinux-policy-targeted-3.13.1-158.9.fc23.
Comment 14 Lukas Vrabec 2016-03-29 07:06:39 EDT
commit 4186cd8a2f2c21778c06258be6dbc40debd42d50
Author: Lukas Vrabec <lvrabec@redhat.com>
Date:   Wed Mar 16 13:20:34 2016 +0100

    Allow to log out to gdm after screen was resized in session via vdagent.
    Resolves: rhbz#1249020
Comment 15 Fedora Update System 2016-03-30 10:40:48 EDT
selinux-policy-3.13.1-158.12.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1cdba6b1c7
Comment 16 Fedora Update System 2016-03-30 18:54:28 EDT
selinux-policy-3.13.1-158.12.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-1cdba6b1c7
Comment 17 Fedora Update System 2016-04-05 09:51:56 EDT
selinux-policy-3.13.1-158.12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 18 Fedora Update System 2016-04-05 12:19:36 EDT
selinux-policy-3.13.1-158.12.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 19 František Zatloukal 2016-05-25 09:05:10 EDT
Description of problem:
Install Fedora 23 from Live ISO to virtual machine (virt-manager 1.3.2-4.20160520git2204de62d9.fc24; qemu 2.6.0-2.fc24 ). To be able to reach gdm, you have to disable Wayland or SELinux.

Version-Release number of selected component:
selinux-policy-3.13.1-152.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.3-300.fc23.x86_64
type:           libreport

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