Skip to content

vhost: input validation enhancements

Stefan Hajnoczi dpdk-dev 1 version Applied

Status from this message: Applied to dpdk-next-virtio.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 9 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/8vhost: add security model documentation to vhost_user.clib/librte_vhost/vhost_user.c+17 -05 replies
2/8vhost: avoid enum fields in VhostUserMsglib/librte_vhost/vhost_user.h+2 -21 reply
3/8vhost: validate untrusted memory.nregions fieldlib/librte_vhost/vhost_user.c+6 -00 replies
4/8vhost: clear out unused SCM_RIGHTS file descriptorslib/librte_vhost/socket.c+7 -10 replies
5/8vhost: reject invalid log base mmap_offset valueslib/librte_vhost/vhost_user.c+9 -00 replies
6/8vhost: fix msg->payload union typo in vhost_user_set_vring_addr()lib/librte_vhost/vhost_user.c+1 -10 replies
7/8vhost: validate virtqueue sizelib/librte_vhost/vhost_user.c+11 -00 replies
8/8vhost: check for memory_size + mmap_offset overflowlib/librte_vhost/vhost_user.c+11 -10 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaxime CoquelinJohn McNamara
SeriesR-b
1/8A-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] vhost: input validation enhancements

This patch series addresses missing input validation that I came across when reviewing vhost_user.c.

The first patch explains the security model and the rest fixes places with missing checks.

Now is a good time to discuss the security model if anyone disagrees or has questions about what Patch 1 says.

Stefan Hajnoczi (8):
vhost: add security model documentation to vhost_user.c
vhost: avoid enum fields in VhostUserMsg
vhost: validate untrusted memory.nregions field
vhost: clear out unused SCM_RIGHTS file descriptors
vhost: reject invalid log base mmap_offset values
vhost: fix msg->payload union typo in vhost_user_set_vring_addr()
vhost: validate virtqueue size
vhost: check for memory_size + mmap_offset overflow

 lib/librte_vhost/vhost_user.h |  4 +--
 lib/librte_vhost/socket.c     |  8 +++++-
 lib/librte_vhost/vhost_user.c | 57 +++++++++++++++++++++++++++++++++++++++++--
 3 files changed, 64 insertions(+), 5 deletions(-)
Signature · 1 line
2.14.3