Red Hat Bugzilla – Bug 1265269
CVE-2015-7311 xen: libxl fails to honour readonly flag on disks with qemu-xen (xsa-142)
Last modified: 2015-09-22 11:30:08 EDT
Callers of libxl can specify that a disk should be read-only to the guest. However, there is no code in libxl to pass this information to qemu-xen (the upstream-based qemu); and indeed there is no way in qemu to make a disk read-only.
The vulnerability is exploitable only via devices emulated by the device model, not the parallel PV devices for supporting PVHVM. Normally the PVHVM device unplug protocol renders the emulated devices inaccessible early in boot.
Malicious guest administrators or (in some situations) users may be able to write to supposedly read-only disk images.
CDROM devices (that is, devices specified to be presented to the guest as CDROMs, regardless of the nature of the backing storage on the host) are not affected.
Only systems using qemu-xen (rather than qemu-xen-traditional) as the device model version are vulnerable.
Only systems using libxl or libxl-based toolstacks are vulnerable. (This includes xl, and libvirt with the libxl driver.)
All versions of libxl which support qemu-xen are vulnerable. The affected code was introduced in Xen 4.1.
If the host and guest together usually support PVHVM, the issue is exploitable only if the malicious guest administrator has control of the guest kernel or guest kernel command line.
Switching to qemu-xen-traditional will avoid this vulnerability. This can be done with device_model_version="qemu-xen-traditional" in the xl configuration file.
Using stub domain device models (which necessarily involves switching to qemu-xen-traditional) will also avoid this vulnerability. This can be done with device_model_stubdomain_override=true in the xl configuration file.
Either of these mitigations is liable to have other guest-visible effects or even regressions.
It may be possible, depending on the configuration, to make the underlying storage object readonly, or to make it reject writes.
Red Hat would like to thank the Xen project for reporting this issue. Upstream acknowledges Michael Young of Durham University as the original reporter.
Fedora bug 1257893 that tracks this issue has been closed as NEXTRELEASE, with the fix being available in Fedora 23.
This issue does not affect the versions of the xen package as shipped with Red Hat Enterprise Linux 5.