aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2016-10-25 17:11:15 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2016-10-25 17:11:15 +0000
commit2caa5c48a8fb51363dafa5ae716d5ba1721ea774 (patch)
tree80e76aac236cd0494806bad65f47ae9440a8db1a
parent1bd8be53ecd4c45f2224dfd03e7312ed57ac8d32 (diff)
downloadsrc-2caa5c48a8fb51363dafa5ae716d5ba1721ea774.tar.gz
src-2caa5c48a8fb51363dafa5ae716d5ba1721ea774.zip
Revised SA-16:15. The initial patch didn't cover all possible overflows
based on passing incorrect parameters to sysarch(2). Security: SA-16:15 Approved by: so
Notes
Notes: svn path=/releng/10.3/; revision=307934
-rw-r--r--UPDATING6
-rw-r--r--sys/amd64/amd64/sys_machdep.c5
-rw-r--r--sys/conf/newvers.sh2
3 files changed, 11 insertions, 2 deletions
diff --git a/UPDATING b/UPDATING
index ab10750aba97..7dbf69e43965 100644
--- a/UPDATING
+++ b/UPDATING
@@ -16,6 +16,12 @@ from older versions of FreeBSD, try WITHOUT_CLANG to bootstrap to the tip of
stable/10, and then rebuild without this option. The bootstrap process from
older version of current is a bit fragile.
+20161025 p11 FreeBSD-SA-16:15.sysarch [revised]
+ FreeBSD-EN-16:17.vm
+
+ Fix incorrect argument validation in sysarch(2). [SA-16:15]
+ Fix virtual memory subsystem bugs. [EN-16:17]
+
20161010 p10 FreeBSD-SA-16:29.bspatch
FreeBSD-SA-16:30.portsnap
FreeBSD-SA-16:31.libarchive
diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c
index ff3bd3edcf8b..5c85272792e7 100644
--- a/sys/amd64/amd64/sys_machdep.c
+++ b/sys/amd64/amd64/sys_machdep.c
@@ -617,6 +617,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))
@@ -629,7 +631,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 a12fc8cf48bd..0ed7f24a787e 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="10.3"
-BRANCH="RELEASE-p10"
+BRANCH="RELEASE-p11"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi