qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] vmdk: Fix possible segfault with non-VMDK backing
Date: Mon, 9 Jul 2018 17:34:45 +0200	[thread overview]
Message-ID: <4b4af548-d1d6-eca8-226c-3769758c7c92@redhat.com> (raw)
In-Reply-To: <20180702210721.4847-1-mreitz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

On 2018-07-02 23:07, Max Reitz wrote:
> The VMDK driver assumes that its backing file is always a VMDK file,
> too, because it verifies that when creating the overlay.  However, that
> verification means nothing at runtime, and consequently you can assign
> non-VMDK backing files to a VMDK node.  This then breaks because the
> driver accesses the backing node as a VMDK node to read its supposed CID
> to compare it with the overlay's parentCID entry -- which usually fails,
> either in a benign way (we read from a garbage offset, and then we read
> garbage or get a read error straight away), or we get a segfault
> (because the backing node does not have a respective file child).
> 
> Anyway, we just shouldn't do it and instead check whether the backing
> file is a VMDK node before treating it like one.
> 
> 
> (This fixes
>  http://lists.nongnu.org/archive/html/qemu-block/2018-06/msg01268.html)
> 
> 
> Max Reitz (2):
>   vmdk: Fix possible segfault with non-VMDK backing
>   iotests: Add VMDK backing file correlation test
> 
>  block/vmdk.c               |   6 ++
>  tests/qemu-iotests/225     | 132 +++++++++++++++++++++++++++++++++++++
>  tests/qemu-iotests/225.out |  24 +++++++
>  tests/qemu-iotests/group   |   1 +
>  4 files changed, 163 insertions(+)
>  create mode 100755 tests/qemu-iotests/225
>  create mode 100644 tests/qemu-iotests/225.out

Applied to my block branch.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2018-07-09 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-02 21:07 [Qemu-devel] [PATCH 0/2] vmdk: Fix possible segfault with non-VMDK backing Max Reitz
2018-07-02 21:07 ` [Qemu-devel] [PATCH 1/2] " Max Reitz
2018-07-03  1:20   ` Fam Zheng
2018-07-02 21:07 ` [Qemu-devel] [PATCH 2/2] iotests: Add VMDK backing file correlation test Max Reitz
2018-07-09 15:34 ` Max Reitz [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-all 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=4b4af548-d1d6-eca8-226c-3769758c7c92@redhat.com \
    --to=mreitz@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).