qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.7? 0/5] block: Use QemuOpts for runtime options
@ 2016-08-12 17:15 Max Reitz
  2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 1/5] block/ssh: " Max Reitz
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Max Reitz @ 2016-08-12 17:15 UTC (permalink / raw)
  To: qemu-block
  Cc: qemu-devel, Max Reitz, Kevin Wolf, Paolo Bonzini, Jeff Cody,
	Richard W . M . Jones

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.


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                |  77 +++++++++++++++-------
 tests/qemu-iotests/162     |  96 +++++++++++++++++++++++++++
 tests/qemu-iotests/162.out |  17 +++++
 tests/qemu-iotests/group   |   1 +
 6 files changed, 284 insertions(+), 83 deletions(-)
 create mode 100755 tests/qemu-iotests/162
 create mode 100644 tests/qemu-iotests/162.out

-- 
2.9.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-15  9:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-12 17:15 [Qemu-devel] [PATCH for-2.7? 0/5] block: Use QemuOpts for runtime options Max Reitz
2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 1/5] block/ssh: " Max Reitz
2016-08-15  9:20   ` Kevin Wolf
2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 2/5] block/nbd: " Max Reitz
2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 3/5] block/blkdebug: Store config filename Max Reitz
2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 4/5] block/nbd: Store runtime option values Max Reitz
2016-08-12 17:15 ` [Qemu-devel] [PATCH for-2.7? 5/5] iotests: Test case for wrong runtime option types Max Reitz
2016-08-15  9:59 ` [Qemu-devel] [PATCH for-2.7? 0/5] block: Use QemuOpts for runtime options Kevin Wolf

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).