From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>, Jeff Cody <jcody@redhat.com>,
"Richard W . M . Jones" <rjones@redhat.com>
Subject: [Qemu-devel] [PATCH for-2.7? v3 0/5] block: Use QemuOpts for runtime options
Date: Mon, 15 Aug 2016 15:29:22 +0200 [thread overview]
Message-ID: <20160815132927.2502-1-mreitz@redhat.com> (raw)
The SSH and NBD block drivers currently directly extract their runtime
options from the options QDict they receive. This is bad practice and
can lead to segmentation faults (which, however, will always be a NULL
pointer dereference, so it should not be exploitable beyond a DoS).
This series fixes that by using QemuOpts instead (like all the other
block drivers do).
With this series applied, there are only two instances of "qdict_get"
left in block/, both of which appear to be safe.
v3:
- Patch 1: Fix fix of leak [Kevin]
v2:
- Patch 1: Fix leak of opts [Kevin]
- Patches 1 and 2: Use the block driver name as a prefix for
runtime_opts [Kevin]
git-backport-diff against v2:
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/5:[0001] [FC] 'block/ssh: Use QemuOpts for runtime options'
002/5:[----] [--] 'block/nbd: Use QemuOpts for runtime options'
003/5:[----] [--] 'block/blkdebug: Store config filename'
004/5:[----] [--] 'block/nbd: Store runtime option values'
005/5:[----] [--] 'iotests: Test case for wrong runtime option types'
Max Reitz (5):
block/ssh: Use QemuOpts for runtime options
block/nbd: Use QemuOpts for runtime options
block/blkdebug: Store config filename
block/nbd: Store runtime option values
iotests: Test case for wrong runtime option types
block/blkdebug.c | 17 +++--
block/nbd.c | 159 ++++++++++++++++++++++++++++++---------------
block/ssh.c | 79 +++++++++++++++-------
tests/qemu-iotests/162 | 96 +++++++++++++++++++++++++++
tests/qemu-iotests/162.out | 17 +++++
tests/qemu-iotests/group | 1 +
6 files changed, 286 insertions(+), 83 deletions(-)
create mode 100755 tests/qemu-iotests/162
create mode 100644 tests/qemu-iotests/162.out
--
2.9.2
next reply other threads:[~2016-08-15 13:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 13:29 Max Reitz [this message]
2016-08-15 13:29 ` [Qemu-devel] [PATCH for-2.7? v3 1/5] block/ssh: Use QemuOpts for runtime options Max Reitz
2016-08-15 13:29 ` [Qemu-devel] [PATCH for-2.7? v3 2/5] block/nbd: " Max Reitz
2016-08-15 13:29 ` [Qemu-devel] [PATCH for-2.7? v3 3/5] block/blkdebug: Store config filename Max Reitz
2016-08-15 13:29 ` [Qemu-devel] [PATCH for-2.7? v3 4/5] block/nbd: Store runtime option values Max Reitz
2016-08-15 13:29 ` [Qemu-devel] [PATCH for-2.7? v3 5/5] iotests: Test case for wrong runtime option types Max Reitz
2016-08-15 14:00 ` [Qemu-devel] [PATCH for-2.7? v3 0/5] block: Use QemuOpts for runtime options Kevin Wolf
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=20160815132927.2502-1-mreitz@redhat.com \
--to=mreitz@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@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).