]> xenbits.xensource.com Git - xen.git/commit
libxl: Do not trust backend for disk eject vdev
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 29 Apr 2016 15:23:35 +0000 (16:23 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 2 Jun 2016 14:53:29 +0000 (15:53 +0100)
commitc69871a2fb26de79a93b6291cc061e11d5764876
treeceb8b9485ea26efb0c83bed8b88a8ef01fb3279c
parent3a5fec03793e0aa389f223d9a21d5a36a26f8b5f
libxl: Do not trust backend for disk eject vdev

For disk eject, use configured vdev from /libxl, not backend.

The backend directory is writeable by driver domains.  This means that
a malicious driver domain could cause libxl to see a wrong vdev,
confusing the user or the toolstack.

Use the vdev from the /libxl space, rather than the backend.

For convenience, we read the vdev from the /libxl space into the evg
during setup and copy it on each event, rather than reading it afresh
each time (which would in any case involve generating or saving a copy
of the relevant /libxl path).

This is part of XSA-178.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c