mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
An unprivileged user of Xenstore is not allowed to write nodes with a size exceeding a global quota, while privileged users like dom0 are allowed to write such nodes. The size of a node is the needed space to store all node specific data, this includes the names of all children of the node. When deleting a node its parent has to be modified by removing the name of the to be deleted child from it. This results in the strange situation that an unprivileged owner of a node might not succeed in deleting that node in case its parent is exceeding the quota of that unprivileged user (it might have been written by dom0), as the user is not allowed to write the updated parent node. Fix that by not checking the quota when writing a node for the purpose of removing a child's name only. The same applies to transaction handling: a node being read during a transaction is written to the transaction specific area and it should not be tested for exceeding the quota, as it might not be owned by the reader and presumably the original write would have failed if the node is owned by the reader. This is part of XSA-115. Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Paul Durrant <paul@xen.org>