qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org,
	qemu-stable@nongnu.org, Stefan Hajnoczi <shajnocz@redhat.com>,
	stefanha@redhat.com, Paolo Bonzini <pbonzini@redhat.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [Qemu-devel] [PATCH V2] net: tap: fix NULL dereference when passing invalid parameters to tap
Date: Wed, 5 Jun 2013 13:20:14 +0200	[thread overview]
Message-ID: <20130605112014.GD30326@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1370323097-11179-1-git-send-email-jasowang@redhat.com>

On Tue, Jun 04, 2013 at 01:18:17PM +0800, Jason Wang wrote:
> This patch forbid the following invalid parameters to tap:
> 
> 1) fd and vhostfds were specified but vhostfd were not specified
> 2) vhostfds were specified but fds were not specified
> 3) fds and vhostfd were specified
> 
> For 1 and 2, net_init_tap_one() will still pass NULL as vhostfdname to
> monitor_handle_fd_param(), which may crash the qemu.
> 
> Also remove the unnecessary has_fd check.
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Stefan Hajnoczi <shajnocz@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> 
> ---
> Changes from v1:
> - check vhostfds for has_helper and all other cases
> - remove the unnecessary check for has_fd when fds were specified
> ---
>  net/tap.c |   18 ++++++++++++------
>  1 files changed, 12 insertions(+), 6 deletions(-)

Thanks, applied to my net tree:
https://github.com/stefanha/qemu/commits/net

Stefan

      reply	other threads:[~2013-06-05 11:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04  5:18 [Qemu-devel] [PATCH V2] net: tap: fix NULL dereference when passing invalid parameters to tap Jason Wang
2013-06-05 11:20 ` Stefan Hajnoczi [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=20130605112014.GD30326@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aliguori@us.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=shajnocz@redhat.com \
    --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).