Skip to contentSkip to conversation

Minor XSM tools patch to dummy module - implement missing stub

PATCH In review George S. Coker, II 2 participants 4 messages Sep 12, 2008 – Oct 6, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Minor XSM tools patch to dummy module - implement missing stub

- This minor patch implements the missing stub function security_label_to_details in the dummy module. This stub function is necessary to create domains with network interfaces for modules that do not implement the security_label_to_details function.

tools/python/xen/util/xsm/dummy/dummy.py +3 -0
diff -r be573a356c90 tools/python/xen/util/xsm/dummy/dummy.py
@@ -131,3 +131,6 @@
 
 def get_ssid(domain):
     err("No ssid has been assigned to any domain under xsm dummy module.")
+
+def security_label_to_details(res_label):
+    return ("","","")

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

George,

is XSM/Flask known to work with a domU with an attached VIF? I find that
this patch here seems necessary, but want to confirm...

diff -r 782599274bf9 tools/python/xen/util/xsm/flask/flask.py
--- a/tools/python/xen/util/xsm/flask/flask.py Tue Sep 30
10:14:54 2008 +0100
+++ b/tools/python/xen/util/xsm/flask/flask.py Mon Oct 06
12:10:31 2008 -0400
@@ -35,7 +35,10 @@
return ssidref

def set_security_label(policy, label):
- return label
+ if label:
+ return label
+ else:
+ return ""

def ssidref2security_label(ssidref):
label = ssidref2label(ssidref)

Is the default policy you have provided allowing a DomU in the cases with a VIF or without a VIF to start?

Also, is the following line from the VM configuration file correct to start a VM while the default policy is enforced?

access_control=['policy=,label=system_u:object_r:domU_t']

Thanks.
Stefan

[email protected] wrote on 09/12/2008 04:48:58 PM:

Quoted 13 lines

"George S. Coker, II" <[email protected]>
Sent by: [email protected]

09/12/2008 04:48 PM

To

xen-devel <[email protected]>

cc

Subject

Quoted 7 lines

[Xen-devel][XSM][Patch] Minor XSM tools patch to dummy module - implement missing stub

- This minor patch implements the missing stub function security_label_to_details in the dummy module. This stub function is necessary to create domains with network interfaces for modules that do

not

Quoted 9 lines

implement the security_label_to_details function.

[attachment "xsm-tools-dummy-update-091208.diff" deleted by Stefan Berger/Watson/IBM] _______________________________________________ Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Although XSM/Flask does not yet support labeling of VIFs, It should work with an attached VIF. I think we have not been very careful in the handling of labels on VIFs, and your patch looks like it addresses that issue. The default policy will allow both cases.

Yes, your access_control setting is correct.

Quoted 69 lines · Stefan Berger

George,

is XSM/Flask known to work with a domU with an attached VIF? I find that
this patch here seems necessary, but want to confirm...

diff -r 782599274bf9 tools/python/xen/util/xsm/flask/flask.py
--- a/tools/python/xen/util/xsm/flask/flask.py Tue Sep 30
10:14:54 2008 +0100
+++ b/tools/python/xen/util/xsm/flask/flask.py Mon Oct 06
12:10:31 2008 -0400

(quoted diff) +4 -1
@@ -35,7 +35,10 @@
     return ssidref
 
 def set_security_label(policy, label):
-    return label
+    if label:
+        return label
+    else:
+        return ""
 
 def ssidref2security_label(ssidref):
     label = ssidref2label(ssidref)

Is the default policy you have provided allowing a DomU in the cases with a VIF or without a VIF to start?

Also, is the following line from the VM configuration file correct to start a VM while the default policy is enforced?

access_control=['policy=,label=system_u:object_r:domU_t']

Thanks.
Stefan

[email protected] wrote on 09/12/2008 04:48:58 PM:

Quoted 29 lines
Quoted 29 lines

"George S. Coker, II" <[email protected]>
Sent by: [email protected]

09/12/2008 04:48 PM

To

xen-devel <[email protected]>

cc

Subject

[Xen-devel][XSM][Patch] Minor XSM tools patch to dummy module - implement missing stub

- This minor patch implements the missing stub function security_label_to_details in the dummy module. This stub function is necessary to create domains with network interfaces for modules that do not implement the security_label_to_details function.

[attachment "xsm-tools-dummy-update-091208.diff" deleted by Stefan Berger/Watson/IBM] _______________________________________________ Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel <http://lists.xensource.com/xen-devel>

Signature · 1 line
George S. Coker, II <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

"George S. Coker, II" <[email protected]> wrote on 10/06/2008 03:36:09 PM:

Quoted 13 lines

"George S. Coker, II" <[email protected]>
10/06/2008 03:36 PM

To

Stefan Berger/Watson/IBM@IBMUS

cc

xen-devel <[email protected]>

Subject

Quoted 8 lines

Re: [Xen-devel][XSM][Patch] Minor XSM tools patch to dummy module - implement missing stub

Although XSM/Flask does not yet support labeling of VIFs, It should work with an attached VIF. I think we have not been very careful in the handling of labels on VIFs, and your patch looks like it addresses that issue. The default policy will allow both cases.

With a domU that has no VIF, I see this here:

(XEN) avc: denied { adjust } for domid=4
(XEN) scontext=system_u:object_r:domU_t tcontext=system_u:object_r:domU_t

The VM also disappears.

Stefan

Quoted 35 lines

Yes, your access_control setting is correct.

On 10/6/08 12:21 PM, "Stefan Berger" <[email protected]> wrote:

George,

is XSM/Flask known to work with a domU with an attached VIF? I
find that this patch here seems necessary, but want to confirm...

diff -r 782599274bf9 tools/python/xen/util/xsm/flask/flask.py
--- a/tools/python/xen/util/xsm/flask/flask.py Tue

Sep 30 10:14:54 2008 +0100
+++ b/tools/python/xen/util/xsm/flask/flask.py                Mon 
Oct 06 12:10:31 2008 -0400
(quoted diff) +4 -1
@@ -35,7 +35,10 @@
     return ssidref
 
 def set_security_label(policy, label):
-    return label
+    if label:
+        return label
+    else:
+        return ""
 
 def ssidref2security_label(ssidref):
     label = ssidref2label(ssidref)

Is the default policy you have provided allowing a DomU in the cases with a VIF or without a VIF to start?

Also, is the following line from the VM configuration file correct to start a VM while the default policy is enforced?

Quoted 29 lines

access_control=['policy=,label=system_u:object_r:domU_t']

Thanks.
Stefan

[email protected] wrote on 09/12/2008 04:48:58 PM:

Quoted 20 lines

"George S. Coker, II" <[email protected]>
Sent by: [email protected]

09/12/2008 04:48 PM

To

xen-devel <[email protected]>

cc

Subject

[Xen-devel][XSM][Patch] Minor XSM tools patch to dummy module - implement missing stub

- This minor patch implements the missing stub function security_label_to_details in the dummy module. This stub function is necessary to create domains with network interfaces for modules that

do not

Quoted 9 lines
Quoted 9 lines

implement the security_label_to_details function.

[attachment "xsm-tools-dummy-update-091208.diff" deleted by Stefan Berger/Watson/IBM] _______________________________________________ Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel <

http://lists.xensource.com/xen-devel>

Quoted 3 lines
Signature · 2 lines
-- 
George S. Coker, II <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel