From: Jeff Cody <jcody@redhat.com>
To: qemu-block@nongnu.org
Cc: peter.maydell@linaro.org, jcody@redhat.com,
qemu-devel@nongnu.org,
Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>,
Max Reitz <mreitz@redhat.com>, Eric Blake <eblake@redhat.com>
Subject: [Qemu-devel] [PULL 1/2] block/ssh: fix possible segmentation fault when .desc is not null-terminated
Date: Wed, 31 Jan 2018 23:06:34 -0500 [thread overview]
Message-ID: <20180201040635.5749-2-jcody@redhat.com> (raw)
In-Reply-To: <20180201040635.5749-1-jcody@redhat.com>
From: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>
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")
Cc: Max Reitz <mreitz@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
block/ssh.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/ssh.c b/block/ssh.c
index b049a16..8890a0c 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 */ }
},
};
--
2.9.5
next prev parent reply other threads:[~2018-02-01 4:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 4:06 [Qemu-devel] [PULL 0/2] Block patches Jeff Cody
2018-02-01 4:06 ` Jeff Cody [this message]
2018-02-01 4:06 ` [Qemu-devel] [PULL 2/2] iotests: Make 200 run on tmpfs Jeff Cody
2018-02-02 10:57 ` [Qemu-devel] [PULL 0/2] Block patches Peter Maydell
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=20180201040635.5749-2-jcody@redhat.com \
--to=jcody@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=muriloo@linux.vnet.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--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 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).