qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: armbru@redhat.com, stefanha@redhat.com, qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/3] qcow2: Fix header extension size check
Date: Tue, 25 Nov 2014 18:22:52 +0100	[thread overview]
Message-ID: <5474BAEC.3000309@redhat.com> (raw)
In-Reply-To: <1416935562-7760-2-git-send-email-kwolf@redhat.com>

On 2014-11-25 at 18:12, Kevin Wolf wrote:
> After reading the extension header, offset is incremented, but not
> checked against end_offset any more. This way an integer overflow could
> happen when checking whether the extension end is within the allowed
> range, effectively disabling the check.
>
> This patch adds the missing check and a test case for it.
>
> Cc: qemu-stable@nongnu.org
> Reported-by: Max Reitz <mreitz@redhat.com>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   block/qcow2.c              | 2 +-
>   tests/qemu-iotests/080     | 2 ++
>   tests/qemu-iotests/080.out | 2 ++
>   3 files changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>

Using g_try_malloc0() might have been nice anyway, but it should work 
without, now (although it should have worked before as well...).

  reply	other threads:[~2014-11-25 17:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 17:12 [Qemu-devel] [PATCH v2 0/3] block: Don't probe for unknown backing file format Kevin Wolf
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 1/3] qcow2: Fix header extension size check Kevin Wolf
2014-11-25 17:22   ` Max Reitz [this message]
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 2/3] qcow2.py: Add required padding for header extensions Kevin Wolf
2014-11-25 17:23   ` Max Reitz
2014-11-25 17:12 ` [Qemu-devel] [PATCH v2 3/3] block: Don't probe for unknown backing file format Kevin Wolf
2014-11-25 17:24   ` Max Reitz
2014-11-28 11:33 ` [Qemu-devel] [PATCH v2 0/3] " Stefan Hajnoczi
2014-12-02 10:23   ` Kevin Wolf

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=5474BAEC.3000309@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).