diff options
author | glebius <glebius@FreeBSD.org> | 2016-10-25 17:11:20 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2016-10-25 17:11:20 +0000 |
commit | 166093516c6aacc3b4828524e9ddc45bfbdd279c (patch) | |
tree | 3fc6fc37e3e5716d0163bc1ffee79a626d821657 | |
parent | 1649f1572fc22ec9708f6f62c0fff2b55ac40096 (diff) | |
download | FreeBSD-src-166093516c6aacc3b4828524e9ddc45bfbdd279c.zip FreeBSD-src-166093516c6aacc3b4828524e9ddc45bfbdd279c.tar.gz |
Revised SA-16:15. The initial patch didn't cover all possible overflows
based on passing incorrect parameters to sysarch(2). [1]
Fix unchecked array reference in the VGA device emulation code. [2]
Security: SA-16:15 [1]
Security: SA-16:32 [2]
Approved by: so
-rw-r--r-- | UPDATING | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/sys_machdep.c | 5 | ||||
-rw-r--r-- | sys/conf/newvers.sh | 2 | ||||
-rw-r--r-- | usr.sbin/bhyve/vga.c | 8 |
4 files changed, 15 insertions, 6 deletions
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to the tip of head, and then rebuild without this option. The bootstrap process from older version of current across the gcc/clang cutover is a bit fragile. +20161025 p2 FreeBSD-SA-16:15.sysarch [revised] + FreeBSD-SA-16:32.bhyve + + Fix incorrect argument validation in sysarch(2). [SA-16:15] + Fix access to host memory from guest in bhyve(8). [SA-16:32] + 20160928: 11.0-RELEASE. diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 4f85e1f..24009db 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs) largest_ld = uap->start + uap->num; if (largest_ld > max_ldt_segment) largest_ld = max_ldt_segment; + if (largest_ld < uap->start) + return (EINVAL); i = largest_ld - uap->start; mtx_lock(&dt_lock); bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) @@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs) /* verify range of descriptors to modify */ largest_ld = uap->start + uap->num; if (uap->start >= max_ldt_segment || - largest_ld > max_ldt_segment) + largest_ld > max_ldt_segment || + largest_ld < uap->start) return (EINVAL); } diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 822c8979..f734ad1 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="11.0" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/vga.c index 208064b..57dc26e 100644 --- a/usr.sbin/bhyve/vga.c +++ b/usr.sbin/bhyve/vga.c @@ -161,10 +161,10 @@ struct vga_softc { */ struct { uint8_t dac_state; - int dac_rd_index; - int dac_rd_subindex; - int dac_wr_index; - int dac_wr_subindex; + uint8_t dac_rd_index; + uint8_t dac_rd_subindex; + uint8_t dac_wr_index; + uint8_t dac_wr_subindex; uint8_t dac_palette[3 * 256]; uint32_t dac_palette_rgb[256]; } vga_dac; |