qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: fix the use of protocols in backing file


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] block: fix the use of protocols in backing files
Date: Thu, 28 Oct 2010 09:10:30 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Lightning/1.0b1 Thunderbird/3.0.8

On 10/28/2010 04:51 AM, Daniel P. Berrange wrote:
The problem is that this wouldn't work in the general case. It's rather
an exception that it makes sense for file: backing files with file:
images. Consider this:

   # qemu-img create -o backing_file=nbd:foo:1234 /tmp/main.img

Without this patch, you'll end up with /tmp/nbd:foo:1234, which is
probably not what you wanted. With a patch that would work for file: you
would get a hardly better path nbd:/tmp/foo:1234
Since we know the protocol, there could be a per-protocol function used
for resolving the backing store URI relative to the master URI. That
would avoid needing to special case file: in the shared generic code.

Relative resolution of a backing files makes me very nervous. Any time a disk image can reasonably resolve to something other than what the user expected is potentially a very nasty security issue.

The less obvious the resolution, the worse the problem becomes. I think resolution based on current path is probably the most obvious implementation.

Regards,

Anthony Liguori

Daniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]