Bug 757345 - selinux targeted policy is blocking spice-vdagent
Summary: selinux targeted policy is blocking spice-vdagent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-26 15:10 UTC by bodhi.zazen
Modified: 2011-12-06 01:05 UTC (History)
2 users (show)

Fixed In Version: selinux-policy-3.10.0-64.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 01:05:35 UTC
Type: ---


Attachments (Terms of Use)

Description bodhi.zazen 2011-11-26 15:10:42 UTC
Description of problem: 

selinux targeted policy is blocking spice-vdagent with confined users


Version-Release number of selected component (if applicable):


How reproducible:

Always

Confine your users (as staff_u or user_u )


Steps to Reproduce:
1. Confine your users (as staff_u or user_u )
2. Login (start spice-vdagent)
3.
  
Actual results:

Spice vdagent does not start


Expected results:

spice vdagent starts

Additional info:

AVC denial
type=AVC msg=audit(1322278140.911:69): avc:  denied  { read } for  pid=2562 comm="spice-vdagentd" name="ld.so.cache" dev=dm-1 ino=136265 scontext=system_u:system_r:vdagent_t:s0 tcontext=staff_u:object_r:ld_so_cache_t:s0:c0.c256 tclass=file

	Was caused by:
		Policy constraint violation.

		May require adding a type attribute to the domain or type to satisfy the constraint.

		Constraints are defined in the policy sources in policy/constraints (general), policy/mcs (MCS), and policy/mls (MLS).


I do not know how to write a local policy for this constraint violation and am no further along despite a google search.

Comment 1 bodhi.zazen 2011-11-28 04:00:42 UTC
This seems to be somewhat similar to this previous bug:

https://bugzilla.redhat.com/show_bug.cgi?id=648553

I am not, however, getting any additional AVC denials, even if I put selinux into permissive mode or if I look for silent denials with semodule -DB

With selinux in enforcing mode I get:

spice-vdagent -x
Missing virtio device: /dev/virtio-ports/com.redhat.spice.0

With selinux in permissive mode , spice-vdagent works.

Spice vdagent works for unconfined users, but not gdm.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Miroslav Grepl 2011-11-28 11:59:05 UTC
Are you playing with MCS?

Hans,
is /dev/virtio-ports/com.redhat.spice.0 something new?

Comment 3 Hans de Goede 2011-11-28 12:39:09 UTC
(In reply to comment #2)
> Hans,
> is /dev/virtio-ports/com.redhat.spice.0 something new?

For the per user session agent process, yes, see:
https://bugzilla.redhat.com/show_bug.cgi?id=737790#c12

Comment 4 Miroslav Grepl 2011-11-28 13:51:52 UTC
Ah, I missed 

"/dev/virtio-ports/com.redhat.spice.0 (which is a symlink to a
/dev/vport#p#)"

Comment 5 bodhi.zazen 2011-11-28 16:46:06 UTC
@Miroslav Grepl and Hans de Goede - thank you both for looking at this problem. 

I was using MCS for a while, but I have removed it now and spice-vdagent behaves the same with a fresh install - not working with confined users.

Comment 6 Daniel Walsh 2011-12-01 21:23:39 UTC
Miroslav we figured out he needed

term_use_virtio_console(staff_t)

Can you add this to userdom.if 

In RHEL6, F15, F16.

Comment 7 bodhi.zazen 2011-12-01 21:30:57 UTC
"we" is a HUGE stretch, thank you for your assistance, as always, Daniel

user_u also please =)

Comment 8 Miroslav Grepl 2011-12-02 08:55:58 UTC
Added.

Comment 9 Fedora Update System 2011-12-02 13:15:50 UTC
selinux-policy-3.10.0-64.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/selinux-policy-3.10.0-64.fc16

Comment 10 Fedora Update System 2011-12-04 02:31:52 UTC
Package selinux-policy-3.10.0-64.fc16:
* should fix your issue,
* was pushed to the Fedora 16 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.10.0-64.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16698/selinux-policy-3.10.0-64.fc16
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2011-12-06 01:05:35 UTC
selinux-policy-3.10.0-64.fc16 has been pushed to the Fedora 16 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.