]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml/xenstored: check privilege for XS_IS_DOMAIN_INTRODUCED
authorEdwin Török <edvin.torok@citrix.com>
Tue, 15 Dec 2020 13:36:56 +0000 (14:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Dec 2020 13:36:56 +0000 (14:36 +0100)
The Xenstore command XS_IS_DOMAIN_INTRODUCED should be possible for privileged
domains only (the only user in the tree is the xenpaging daemon).

This is part of XSA-115.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/ocaml/xenstored/process.ml

index 0a0e43d1f0fa7079c439eb2f759a81e51a5b8cb9..f374abe99836a506b174e19d9240549cc186568c 100644 (file)
@@ -166,7 +166,9 @@ let do_setperms con t domains cons data =
 let do_error con t domains cons data =
        raise Define.Unknown_operation
 
-let do_isintroduced con t domains cons data =
+let do_isintroduced con _t domains _cons data =
+       if not (Connection.is_dom0 con)
+       then raise Define.Permission_denied;
        let domid =
                match (split None '\000' data) with
                | domid :: _ -> int_of_string domid