Description of problem: The location /local/domain/$DOMID in xenstore is fully writable by guest virtual machines. Unfortunately, libvirt reads a few pieces of data from here & uses them in ways which are potentially unsafe. Specifically we read - VNC port for graphical framebuffer - TTY path for text console This info is expoed in the libvirt XML, which is then used by other virt enabled applications like virt-manager, virt-install. It is possible that a malicious guest can write bogus data into xenstore which would cause applications using libvirt to perform unsafe actions. Version-Release number of selected component (if applicable): libvirt-0.3.3-7.el5 How reproducible: Always Steps to Reproduce: 1. Inside a gueest #yum install xen # xenstore-write /local/domain/GUEST-DOMID/console/tty /i/am/the/evil/guest 2. On the host virsh dumpxml GUEST-NAME | grep console Actual results: # virsh dumpxml rhel5pv | grep console <console tty='/i/am/the/evil/guest'/> Expected results: # virsh dumpxml rhel5pv | grep console <console tty='/dev/pty/3'/> ie, console tty is not impacted by guest. Likewise for VNC port Additional info:
Upstream xen has revised their original patch dealing with this problem. Instead of moving the 'console' area within xenstore, it is now made read-only to the guest http://xenbits.xensource.com/staging/xen-3.3-testing.hg?rev/e0e17216ba70 So the TTY path problem should no longer be an security issue wrt libvirt. We still need to check other usage of xenstore in libvirt to make sure its not using untrusted data. Hopefully nothing will need changing, but I'll leave this open for now, until we've audited libvirt's use of xenstore.
Libvirt usage of XenStore is now safe, following the fixes to XenStore permissions for guest areas.