From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1.0] qiov: prevent double free or use-after-free
Date: Fri, 25 Nov 2011 12:55:21 +0100 [thread overview]
Message-ID: <4ECF8229.8000805@redhat.com> (raw)
In-Reply-To: <4ECF8264.7020606@redhat.com>
On 11/25/2011 12:56 PM, Kevin Wolf wrote:
>> qemu_iovec_destroy does not clear the QEMUIOVector fully, and the data
>> > could thus be used after free or freed again. While I do not know any
>> > example in the tree, I observed this using virtio-scsi (and SCSI
>> > scatter/gather) when canceling DMA requests.
>> >
>> > Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> This isn't a bug fix for itself, it just makes bugs in other code more
> visible, right? It probably makes sense to do this change, but I'm not
> sure about doing it for 1.0.
It is a fix. NULLing the pointer prevents double-free bugs, and setting
niov/nalloc to 0 should prevent use-after-free.
Paolo
prev parent reply other threads:[~2011-11-25 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 11:06 [Qemu-devel] [PATCH 1.0] qiov: prevent double free or use-after-free Paolo Bonzini
2011-11-25 11:56 ` Kevin Wolf
2011-11-25 11:55 ` Paolo Bonzini [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=4ECF8229.8000805@redhat.com \
--to=pbonzini@redhat.com \
--cc=kwolf@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.