examples/vhost_scsi: move to safe GPA translation API
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Wed, 14 Mar 2018 15:46:46 +0000 (16:46 +0100)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 23 Apr 2018 15:12:13 +0000 (17:12 +0200)
commita3258d299378e33609409b36aebd987bc15033ea
tree8794e93f86e61417d5937a58ff2aa8a341628e0e
parent82c93a567d3b987f9a93909e2087432450680a63
examples/vhost_scsi: move to safe GPA translation API

This patch uses the new rte_vhost_va_from_guest_pa() API
to ensure all the descriptor buffer is mapped contiguously
in the application virtual address space.

As the application did not checked return of previous API,
this patch just print an error if the buffer address isn't in
the vhost memory regions or if it is scattered. Ideally, it
should handle scattered buffers gracefully.

This issue has been assigned CVE-2018-1059.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost_scsi/vhost_scsi.c