]> xenbits.xensource.com Git - xen.git/commit
oxenstored: Protect oxenstored from malicious domains.
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 3 Sep 2013 10:55:48 +0000 (11:55 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 3 Sep 2013 10:55:48 +0000 (11:55 +0100)
commit9f93027afd796a98d7b92898f4ccc772796a4874
tree673aca110f182ea92052bbf3729f3622b54de9d6
parent56b2771863b7835faf6fa07290bcacb3a68a8326
oxenstored: Protect oxenstored from malicious domains.

add check logic when read from IO ring, and if error happens,
then mark the reading connection as "bad", Unless vm reboot,
oxenstored will not handle message from this connection any more.

xs_ring_stubs.c: add a more strict check on ring reading
connection.ml, domain.ml: add getter and setter for bad flag
process.ml: if exception raised when reading from domain's ring,
            mark this domain as "bad"
xenstored.ml: if a domain is marked as "bad", do not handle it.

Signed-off-by: John Liu <john.liuqiming@huawei.com>
Acked-by: David Scott <dave.scott@eu.citrix.com>
(cherry picked from commit 704302ce9404c73cfb687d31adcf67094ab5bb53)
(cherry picked from commit a978634bee4db6c5e0ceeb66adcc5114f3f9bc48)

Conflicts:
tools/ocaml/xenstored/domain.ml

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/ocaml/libs/xb/xs_ring_stubs.c
tools/ocaml/xenstored/connection.ml
tools/ocaml/xenstored/domain.ml
tools/ocaml/xenstored/process.ml
tools/ocaml/xenstored/xenstored.ml