qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>,
	Richard W M Jones <rjones@redhat.com>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] block/ssh: fix possible segmentation fault when .desc is not null-terminated
Date: Fri, 5 Jan 2018 10:57:43 -0600	[thread overview]
Message-ID: <1818f13c-0e9e-70da-8d39-9ff9f07c3982@redhat.com> (raw)
In-Reply-To: <20180105144440.18129-1-muriloo@linux.vnet.ibm.com>

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

On 01/05/2018 08:44 AM, Murilo Opsfelder Araujo wrote:
> This patch prevents a possible segmentation fault when .desc members are checked
> against NULL.
> 
> The ssh_runtime_opts was added by commit
> 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime
> options").
> 
> This fix was inspired by
> http://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00883.html.
> 
> Fixes: 8a6a80896d6af03b8ee0c17cdf37219eca2588a7 ("block/ssh: Use QemuOpts for runtime options")

present since 2.7.0, so we've gotten lucky that no one has actually
encountered a crash (but I didn't try hard to see if one was possible)

> Cc: Max Reitz <mreitz@redhat.com>
> Cc: Eric Blake <eblake@redhat.com>
> Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>
> ---
>  block/ssh.c | 1 +
>  1 file changed, 1 insertion(+)

CC: qemu-stable@nongnu.org
Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block/ssh.c b/block/ssh.c
> index b049a16eb9..8890a0c4ba 100644
> --- a/block/ssh.c
> +++ b/block/ssh.c
> @@ -556,6 +556,7 @@ static QemuOptsList ssh_runtime_opts = {
>              .type = QEMU_OPT_STRING,
>              .help = "Defines how and what to check the host key against",
>          },
> +        { /* end of list */ }
>      },
>  };
>  
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


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

  reply	other threads:[~2018-01-05 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 14:44 [Qemu-devel] [PATCH] block/ssh: fix possible segmentation fault when .desc is not null-terminated Murilo Opsfelder Araujo
2018-01-05 16:57 ` Eric Blake [this message]
2018-02-15 14:09   ` Murilo Opsfelder Araujo
2018-02-15 14:48     ` Eric Blake
2018-01-08  4:43 ` Jeff Cody

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=1818f13c-0e9e-70da-8d39-9ff9f07c3982@redhat.com \
    --to=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=muriloo@linux.vnet.ibm.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=rjones@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).