From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, spbrogan@outlook.com, discuss@edk2.groups.io
Subject: Re: [edk2-devel] OVMF/QEMU shell based unit tests and writing to a virtual disk
Date: Tue, 27 Oct 2020 14:41:20 +0100 [thread overview]
Message-ID: <b4ef8d8e-b760-a7bd-ca27-83762815d2e9@redhat.com> (raw)
In-Reply-To: <aa64424e-31b6-4857-474d-1a7acae5dacf@redhat.com>
On 10/27/20 14:26, Laszlo Ersek wrote:
> Now, another option (on Linux anyway) is to loop-mount a "raw" virtual
> disk image. This is not recommended, as it directly exposes the host
> kernel's filesystem driver(s) to metadata produced by the guest. It
> could trigger security issues in the host kernel.
>
> (This is exactly what guestfish avoids, by running a separate Linux
> guest -- called the "libguestfs appliance" -- on top of the virtual disk
> image. The guestfish command interpreter on the host side exchanges
> commands and data with the appliance over virtio-serial. If the metadata
> on the disk image is malicious, it will break / exploit the *guest*
> kernel in the appliance. The host-side component, the guestfish command
> interpreter, only has to sanity-check the virtio-serial exchanges.)
If you trust your guest 100%, you *might* try the following:
- use a disk image file with "format=vhdx" on the QEMU command line,
- when QEMU is not running, I think you might be able to "loop-mount"
the VHDX file directly, on Windows.
Mutual exclusion remains just as important, of course.
... A reference about vhdx support:
<https://www.qemu.org/docs/master/system/images.html#cmdoption-image-formats-arg-vhdx>.
... A reference about the pitfalls with vvfat:
<https://www.qemu.org/docs/master/system/images.html#virtual-fat-disk-images>.
Thanks,
Laszlo
prev parent reply other threads:[~2020-10-27 13:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 18:55 OVMF/QEMU shell based unit tests and writing to a virtual disk Sean
2020-10-27 13:26 ` [edk2-devel] " Laszlo Ersek
2020-10-27 13:41 ` Laszlo Ersek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4ef8d8e-b760-a7bd-ca27-83762815d2e9@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox