aboutsummaryrefslogtreecommitdiff
path: root/share/security/patches/SA-16:38/bhyve-10.patch
diff options
context:
space:
mode:
Diffstat (limited to 'share/security/patches/SA-16:38/bhyve-10.patch')
-rw-r--r--share/security/patches/SA-16:38/bhyve-10.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/share/security/patches/SA-16:38/bhyve-10.patch b/share/security/patches/SA-16:38/bhyve-10.patch
new file mode 100644
index 0000000000..aabab5315d
--- /dev/null
+++ b/share/security/patches/SA-16:38/bhyve-10.patch
@@ -0,0 +1,19 @@
+--- lib/libvmmapi/vmmapi.c.orig
++++ lib/libvmmapi/vmmapi.c
+@@ -263,12 +263,14 @@
+ /* XXX VM_MMAP_SPARSE not implemented yet */
+ assert(ctx->vms == VM_MMAP_ALL);
+
+- if (gaddr < ctx->lowmem && gaddr + len <= ctx->lowmem)
++ if (gaddr < ctx->lowmem && len <= ctx->lowmem &&
++ gaddr + len <= ctx->lowmem)
+ return ((void *)(ctx->lowmem_addr + gaddr));
+
+ if (gaddr >= 4*GB) {
+ gaddr -= 4*GB;
+- if (gaddr < ctx->highmem && gaddr + len <= ctx->highmem)
++ if (gaddr < ctx->highmem && len <= ctx->highmem &&
++ gaddr + len <= ctx->highmem)
+ return ((void *)(ctx->highmem_addr + gaddr));
+ }
+