[Libguestfs] [PATCH 0/2] First part of fix for CVE-2010-3851

Richard W.M. Jones rjones at redhat.com
Thu Oct 21 18:40:40 UTC 2010

These two patches implement the first (and hardest) part of the fix
for CVE-2010-3851.

This adds a way to specify the format when adding a drive, avoiding
qemu's auto-detection.

In order to avoid an explosion of different add_drive_* functions (we
have 4 already), we have implemented a way to specify optional
arguments to functions, so all we need is a single new
'add_drive_opts' call.

The upshot is that (for example) Perl programs can be modified from

  $g->add_drive ($file);   # unsafe if $file is not trusted

to this:

  $g->add_drive_opts ($file, format => "raw");   # safe

The optional argument syntax for guestfish and all the various
languages we support is summarised at the top of the second patch.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html

More information about the Libguestfs mailing list