cloud-hypervisor/vm-virtio
Eryu Guan 61e34331c2 virtio-fs: validate request len in fs_slave_io()
We made sure gpa is in cache range, but not the end addr of request,
which is (gpa + len). If the end addr of request is beyond dax cache
window, vmm would corrupt guest memory or crash.

Fix it by making sure end addr of request is within cache range as well.
And while we're at it, return EFAULT if the request is out of range, as
write(2)/read(2) returns EFAULT when buffer is outside accessible
address space.

Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2020-03-25 13:12:26 +01:00
..
src virtio-fs: validate request len in fs_slave_io() 2020-03-25 13:12:26 +01:00
Cargo.toml build: Bump vm-memory and linux-loader dependencies 2020-03-23 14:27:41 +00:00