]> 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 11:03:39 +0000 (12:03 +0100)
commit070ab4c505934951f86f42dd8403cf62bc5822f0
tree31b43a4b93625479f1d3327fd558ac75339c1d71
parent5b06843aa764012b9ace06ebac01c1fcf76e3fb7
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>
(cherry picked from commit 9f93027afd796a98d7b92898f4ccc772796a4874)
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