qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Better NBD string length handling
@ 2019-10-10 21:00 Eric Blake
  2019-10-10 21:00 ` [PATCH v2 1/2] nbd: Don't send oversize strings Eric Blake
  2019-10-10 21:00 ` [PATCH v2 2/2] nbd: Allow description when creating NBD blockdev Eric Blake
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Blake @ 2019-10-10 21:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, vsementsov, qemu-block, mlevitsk

Patch 1 is a revised version after Maxim's comments - it moves the
length checks earlier into the system (for cleaner error messages
as soon as possible) and adds asserts at the later points that
are now guaranteed by the earlier checks. It also covers more
string handling, both in the client and in the server, by
ensuring that outgoing strings are properly constrained and
incoming strings are checked for validity before blind use.

Patch 2 is a new patch, written to make testing of description
strings in patch 1 easier.

Eric Blake (2):
  nbd: Don't send oversize strings
  nbd: Allow description when creating NBD blockdev

 qapi/block.json            |  8 +++++---
 include/block/nbd.h        |  1 +
 block/nbd.c                |  9 +++++++++
 blockdev-nbd.c             | 14 +++++++++++++-
 monitor/hmp-cmds.c         |  4 ++--
 nbd/client.c               | 16 +++++++++++++---
 nbd/server.c               | 14 ++++++++++++--
 qemu-nbd.c                 |  9 +++++++++
 tests/qemu-iotests/223     |  2 +-
 tests/qemu-iotests/223.out |  1 +
 10 files changed, 66 insertions(+), 12 deletions(-)

-- 
2.21.0



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

end of thread, other threads:[~2019-11-13 16:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 21:00 [PATCH v2 0/2] Better NBD string length handling Eric Blake
2019-10-10 21:00 ` [PATCH v2 1/2] nbd: Don't send oversize strings Eric Blake
2019-10-11  7:32   ` Vladimir Sementsov-Ogievskiy
2019-10-15 15:07     ` Eric Blake
2019-10-15 16:16       ` Vladimir Sementsov-Ogievskiy
2019-11-04 17:41         ` Maxim Levitsky
2019-11-13 15:47         ` Eric Blake
2019-10-10 21:00 ` [PATCH v2 2/2] nbd: Allow description when creating NBD blockdev Eric Blake
2019-10-11  7:41   ` Vladimir Sementsov-Ogievskiy
2019-11-04 17:53   ` Maxim Levitsky

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