From: Paul Mackerras <paulus@ozlabs.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: dan.carpenter@oracle.com, linuxppc-dev@lists.ozlabs.org,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: Prevent double-free on HPT resize commit path
Date: Tue, 28 Feb 2017 15:59:27 +1100 [thread overview]
Message-ID: <20170228045927.GB25371@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <20170228005655.GK17615@umbus.fritz.box>
On Tue, Feb 28, 2017 at 11:56:55AM +1100, David Gibson wrote:
> On Wed, Feb 15, 2017 at 02:40:04PM +1100, David Gibson wrote:
> > resize_hpt_release(), called once the HPT resize of a KVM guest is
> > completed (successfully or unsuccessfully) free()s the state structure for
> > the resize. It is currently not safe to call with a NULL pointer.
> >
> > However, one of the error paths in kvm_vm_ioctl_resize_hpt_commit() can
> > invoke it with a NULL pointer. This will occur if userspace improperly
> > invokes KVM_PPC_RESIZE_HPT_COMMIT without previously calling
> > KVM_PPC_RESIZE_HPT_PREPARE, or if it calls COMMIT twice without an
> > intervening PREPARE.
> >
> > To fix this potential crash bug - and maybe others like it, make it safe
> > (and a no-op) to call resize_hpt_release() with a NULL resize pointer.
> >
> > Found by Dan Carpenter with a static checker.
> >
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
>
> Ping,
>
> Paul have you taken this one?
Yes, thanks, it's in Linus' tree now.
Paul.
prev parent reply other threads:[~2017-02-28 4:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 3:40 [PATCH] KVM: Prevent double-free on HPT resize commit path David Gibson
2017-02-28 0:56 ` David Gibson
2017-02-28 4:59 ` Paul Mackerras [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=20170228045927.GB25371@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=dan.carpenter@oracle.com \
--cc=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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).