[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] ioemu: Disable format auto-probing in monitor command change
Markus Armbruster writes ("[Xen-devel] [PATCH] ioemu: Disable format auto-probing in monitor command change"): > Format auto-probing of writable images is a security hole. The last > known remaining instance is monitor command change. Disable probing > there and use raw. This breaks change for images in all other > formats. > > Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx> For the avoidance of any doubt, re Markus's patch: Acked-By: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> But this should be applied together with the patch I posted earlier, which I assume Markus is also now happy with. So here is that one again for your comfort and convenience. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Ian. diff -r a88e19526770 tools/ioemu/hw/usb-msd.c --- a/tools/ioemu/hw/usb-msd.c Fri Jun 13 15:31:35 2008 +0100 +++ b/tools/ioemu/hw/usb-msd.c Fri Jun 13 16:08:34 2008 +0100 @@ -510,7 +510,7 @@ static void usb_msd_handle_destroy(USBDe qemu_free(s); } -USBDevice *usb_msd_init(const char *filename) +USBDevice *usb_msd_init(const char *filename, BlockDriver *drv) { MSDState *s; BlockDriverState *bdrv; @@ -520,7 +520,7 @@ USBDevice *usb_msd_init(const char *file return NULL; bdrv = bdrv_new("usb"); - if (bdrv_open(bdrv, filename, 0) < 0) + if (bdrv_open2(bdrv, filename, 0, drv) < 0) goto fail; s->bs = bdrv; diff -r a88e19526770 tools/ioemu/hw/usb.h --- a/tools/ioemu/hw/usb.h Fri Jun 13 15:31:35 2008 +0100 +++ b/tools/ioemu/hw/usb.h Fri Jun 13 16:08:05 2008 +0100 @@ -217,7 +217,7 @@ USBDevice *usb_tablet_init(void); USBDevice *usb_tablet_init(void); /* usb-msd.c */ -USBDevice *usb_msd_init(const char *filename); +USBDevice *usb_msd_init(const char *filename, BlockDriver *drv); /* usb.c */ void generic_usb_save(QEMUFile* f, void *opaque); diff -r a88e19526770 tools/ioemu/vl.c --- a/tools/ioemu/vl.c Fri Jun 13 15:31:35 2008 +0100 +++ b/tools/ioemu/vl.c Fri Jun 13 16:08:51 2008 +0100 @@ -4260,7 +4260,9 @@ static int usb_device_add(const char *de } else if (!strcmp(devname, "tablet")) { dev = usb_tablet_init(); } else if (strstart(devname, "disk:", &p)) { - dev = usb_msd_init(p); + dev = usb_msd_init(p, &bdrv_raw); + } else if (strstart(devname, "disk-qcow:", &p)) { + dev = usb_msd_init(p, 0); } else { return -1; } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |