vhost: handle virtually non-contiguous buffers in Tx
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 24 Jan 2018 16:19:29 +0000 (17:19 +0100)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 23 Apr 2018 15:12:13 +0000 (17:12 +0200)
commit91b7b40806b6ea9910d6686fddcf7c970771fa72
tree8207ce427639933616bb2ea03945352f88ae3158
parentd0c24508e1f7173612dc9ebc5b36f417284568d7
vhost: handle virtually non-contiguous buffers in Tx

This patch enables the handling of buffers non-contiguous in
process virtual address space in the dequeue path.

When virtio-net header doesn't fit in a single chunck, it is
copied into a local variablei before being processed.

For packet content, the copy length is limited to the chunck
size, next chuncks VAs being fetched afterward.

This issue has been assigned CVE-2018-1059.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c