Skip to contentSkip to conversation

Updates to SELinux refpolicies to make xenconsoled work. (v1)

PATCH New Konrad Rzeszutek Wilk 2 participants 5 messages Oct 9, 2017

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 kernel/xen: Update for Xen 4.6

In reply to Konrad Rzeszutek Wilk

From: Konrad Rzeszutek Wilk <[email protected]>

libxenstored since git commit 9c89dc95201ffed5fead17b35754bf9440fdbdc0 prefers to use "/dev/xen/xenbus" over the "/proc/xen/xenbus".

---
 policy/modules/kernel/devices.fc | 1 +
 1 file changed, 1 insertion(+)
policy/modules/kernel/devices.fc +1 -0
index f4093434b..e206720be 100644
@@ -183,6 +183,7 @@ ifdef(`distro_suse', `
 /dev/xen/gntdev		-c	gen_context(system_u:object_r:xen_device_t,s0)
 /dev/xen/gntalloc	-c	gen_context(system_u:object_r:xen_device_t,s0)
 /dev/xen/privcmd	-c	gen_context(system_u:object_r:xen_device_t,s0)
+/dev/xen/xenbus		-c	gen_context(system_u:object_r:xen_device_t,s0)
 
 ifdef(`distro_debian',`
 # this is a static /dev dir "backup mount"
Signature · 1 line
2.13.3
#3 lore raw

PATCH 2/2 kernel/xen: Add map permission to the dev_rw_xen

In reply to Konrad Rzeszutek Wilk

From: Konrad Rzeszutek Wilk <[email protected]>

type=AVC msg=audit(1504637347.487:280): avc: denied { map } for pid=857 comm="xenconsoled" path="/dev/xen/privcmd" dev="devtmpfs" ino=16289 scontext=system_u:system_r:xenconsoled_t:s0

Without this we can't use xenconsole (client) to
talk to xenconsoled (server).

---
 policy/modules/kernel/devices.if | 1 +
 1 file changed, 1 insertion(+)
policy/modules/kernel/devices.if +1 -0
index 4c47709ff..c9071df8f 100644
@@ -4984,6 +4984,7 @@ interface(`dev_rw_xen',`
 	')
 
 	rw_chr_files_pattern($1, device_t, xen_device_t)
+	allow $1 xen_device_t:chr_file map;
 ')
 
 ########################################
Signature · 1 line
2.13.3
#0 lore raw

PATCH 1/1 Updates to SELinux refpolicies to make xenconsoled work. (v1)

Hey!
Since Xen 4.6 the xenstored prefers to use /dev/xen/xenbus instead of /proc/xen/xenbus. That wasn't in the original email that Anthony had sent:

"[refpolicy] [SELINUX POLICY PATCH] Update for Xen 4.7"
http://oss.tresys.com/pipermail/refpolicy/2017-August/009784.html

But nonetheless it is needed to make xenconsoled work on Fedora installs.

Additionally we also add the 'map' functionality to make the xenconsoled /xenconsole work together.

For more details, please see:
https://bugzilla.redhat.com/show_bug.cgi?id=1484908

Please merge at your convience.

Konrad Rzeszutek Wilk (2):
kernel/xen: Update for Xen 4.6 kernel/xen: Add map permission to the dev_rw_xen

 policy/modules/kernel/devices.fc | 1 +
 policy/modules/kernel/devices.if | 1 +
 2 files changed, 2 insertions(+)

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

PATCH 1/2 kernel/xen: Update for Xen 4.6

In reply to Konrad Rzeszutek Wilk
Quoted 15 lines · Konrad Rzeszutek Wilk via refpolicy

From: Konrad Rzeszutek Wilk <[email protected]>

libxenstored since git commit 9c89dc95201ffed5fead17b35754bf9440fdbdc0 prefers to use "/dev/xen/xenbus" over the "/proc/xen/xenbus".

---
  policy/modules/kernel/devices.fc | 1 +
  1 file changed, 1 insertion(+)
policy/modules/kernel/devices.fc +0 -0
index f4093434b..e206720be 100644

policy/modules/kernel/devices.fc ifdef(`distro_suse', ` · line 189

Quoted 7 lines
policy/modules/kernel/devices.fc +1 -0
@@ -183,6 +183,7 @@ ifdef(`distro_suse', `
  /dev/xen/gntdev		-c	gen_context(system_u:object_r:xen_device_t,s0)
  /dev/xen/gntalloc	-c	gen_context(system_u:object_r:xen_device_t,s0)
  /dev/xen/privcmd	-c	gen_context(system_u:object_r:xen_device_t,s0)
+/dev/xen/xenbus		-c	gen_context(system_u:object_r:xen_device_t,s0)
 
  ifdef(`distro_debian',`
  # this is a static /dev dir "backup mount"

Merged.

Signature · 1 line
Chris PeBenito
#4 lore raw

PATCH 2/2 kernel/xen: Add map permission to the dev_rw_xen

In reply to Konrad Rzeszutek Wilk
Quoted 17 lines · Konrad Rzeszutek Wilk via refpolicy

From: Konrad Rzeszutek Wilk <[email protected]>

type=AVC msg=audit(1504637347.487:280): avc: denied { map } for pid=857 comm="xenconsoled" path="/dev/xen/privcmd" dev="devtmpfs" ino=16289 scontext=system_u:system_r:xenconsoled_t:s0

Without this we can't use xenconsole (client) to
talk to xenconsoled (server).

---
  policy/modules/kernel/devices.if | 1 +
  1 file changed, 1 insertion(+)
policy/modules/kernel/devices.if +0 -0
index 4c47709ff..c9071df8f 100644

policy/modules/kernel/devices.if interface(`dev_rw_xen',` · line 4990

Quoted 7 lines
policy/modules/kernel/devices.if +1 -0
@@ -4984,6 +4984,7 @@ interface(`dev_rw_xen',`
  	')
 
  	rw_chr_files_pattern($1, device_t, xen_device_t)
+	allow $1 xen_device_t:chr_file map;
  ')
 
  ########################################

Merged.

Signature · 1 line
Chris PeBenito