From: Markus Armbruster Subject: [PATCH] ioemu: Disable format auto-probing in monitor command change Date: Tue, 17 Jun 2008 18:59:25 +0200 Message-ID: <878wx4knf6.fsf_-_@pike.pond.sub.org> References: <200805081800.24064.turkay.eren@gmail.com> <18467.12572.126574.502777@mariner.uk.xensource.com> <20080508171255.GA31908@redhat.com> <18467.13858.203078.97403@mariner.uk.xensource.com> <20080508172304.GB31908@redhat.com> <18467.14318.921215.768838@mariner.uk.xensource.com> <20080508173023.GC31908@redhat.com> <18468.29633.937355.26121@mariner.uk.xensource.com> <18473.52451.967004.377867@mariner.uk.xensource.com> <8763sw9nfx.fsf@pike.pond.sub.org> <18496.793.632548.533855@mariner.uk.xensource.com> <18514.36535.961030.856448@mariner.uk.xensource.com> <87tzfto0ep.fsf@pike.pond.sub.org> <18518.35502.522506.191854@mariner.uk.xensource.com> <87prqhnxoi.fsf@pike.pond.sub.org> <18518.39663.74413.329755@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <18518.39663.74413.329755@mariner.uk.xensource.com> (Ian Jackson's message of "Mon\, 16 Jun 2008 17\:55\:11 +0100") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Eren =?utf-8?Q?T=C3=BCrkay?= , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 diff -r ac745ad5f018 tools/ioemu/monitor.c --- a/tools/ioemu/monitor.c Fri Jun 13 16:10:50 2008 +0100 +++ b/tools/ioemu/monitor.c Tue Jun 17 18:43:25 2008 +0200 @@ -387,7 +387,7 @@ static void do_change_block(const char * } if (eject_device(bs, 0) < 0) return; - bdrv_open(bs, filename, 0); + bdrv_open2(bs, filename, 0, &bdrv_raw); if (bdrv_is_encrypted(bs)) { term_printf("%s is encrypted.\n", device); for(i = 0; i < 3; i++) {