]> xenbits.xensource.com Git - xen.git/commit
tools/xenstore: simplify and fix per domain node accounting
authorJuergen Gross <jgross@suse.com>
Tue, 13 Sep 2022 05:35:08 +0000 (07:35 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Nov 2022 13:05:44 +0000 (13:05 +0000)
commitdbef1f7482894c572d90cd73d99ed689c891e863
treef4ce40af9ab4cf0b3dcd17c5f1afcd823088abd2
parent3047df38e1991510bc295e3e1bb6b6b6c4a97831
tools/xenstore: simplify and fix per domain node accounting

The accounting of nodes can be simplified now that each connection
holds the associated domid.

Fix the node accounting to cover nodes created for a domain before it
has been introduced. This requires to react properly to an allocation
failure inside domain_entry_inc() by returning an error code.

Especially in error paths the node accounting has to be fixed in some
cases.

This is part of XSA-326 / CVE-2022-42313.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_domain.c
tools/xenstore/xenstored_domain.h
tools/xenstore/xenstored_transaction.c