qemu-e2k/contrib/libvhost-user
Yongji Xie 293084a719 libvhost-user: Support across-memory-boundary access
The sg list/indirect descriptor table may be contigious
in GPA but not in HVA address space. But libvhost-user
wasn't aware of that. This would cause out-of-bounds
access. Even a malicious guest could use it to get
information from the vhost-user backend.

Introduce a plen parameter in vu_gpa_to_va() so we can
handle this case, returning the actual mapped length.

Signed-off-by: Yongji Xie <xieyongji@baidu.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-02-13 18:25:48 +02:00
..
Makefile.objs libvhost-user: add glib source helper 2017-10-10 23:31:09 +02:00
libvhost-user-glib.c libvhost-user: add glib source helper 2017-10-10 23:31:09 +02:00
libvhost-user-glib.h libvhost-user: add glib source helper 2017-10-10 23:31:09 +02:00
libvhost-user.c libvhost-user: Support across-memory-boundary access 2018-02-13 18:25:48 +02:00
libvhost-user.h libvhost-user: Support across-memory-boundary access 2018-02-13 18:25:48 +02:00