Page MenuHomeFreeBSD

D60870.1794894197.diff
No OneTemporary

Authored By
Unknown
Size
694 B
Referenced Files
None
Subscribers
None

D60870.1794894197.diff

diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c
--- a/usr.sbin/bhyve/virtio.c
+++ b/usr.sbin/bhyve/virtio.c
@@ -48,6 +48,8 @@
#endif
#include "virtio.h"
+#define WPRINTF(params) PRINTLN params
+
/*
* Functions for dealing with generalized "virtual devices" as
* defined by <https://www.google.com/#output=search&q=virtio+spec>
@@ -230,6 +232,11 @@
addr = atomic_load_64(&vd->addr);
iov[i].iov_len = len;
iov[i].iov_base = paddr_guest2host(ctx, addr, len);
+ if (iov[i].iov_base == NULL) {
+ WPRINTF(("%s: invalid guest address 0x%lx len %u\n",
+ __func__, addr, len));
+ return;
+ }
if ((vd->flags & VRING_DESC_F_WRITE) == 0)
reqp->readable++;
else

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 17, 5:43 AM (10 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41470621
Default Alt Text
D60870.1794894197.diff (694 B)

Event Timeline