vhost: handle virtually non-contiguous buffers in Rx-mrg
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 1 Mar 2018 08:36:33 +0000 (09:36 +0100)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 23 Apr 2018 15:12:13 +0000 (17:12 +0200)
commitfb3815cc614dc754a96e5933165a2ded66b87164
tree914a0d4e93fcba2e92f8239c0bd3656299de4e77
parent6727f5a739b6f26689e5189a74d37afdb926c0ac
vhost: handle virtually non-contiguous buffers in Rx-mrg

This patch enables the handling of buffers non-contiguous in
process virtual address space in the enqueue path when mergeable
buffers are used.

When virtio-net header doesn't fit in a single chunck, it is
computed in a local variable and copied to the buffer chuncks
afterwards.

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