Date: Tue, 25 Oct 2016 17:11:11 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r307933 - in releng/10.2: . sys/amd64/amd64 sys/conf Message-ID: <201610251711.u9PHBBR8075409@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Tue Oct 25 17:11:11 2016 New Revision: 307933 URL: https://svnweb.freebsd.org/changeset/base/307933 Log: 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 Modified: releng/10.2/UPDATING releng/10.2/sys/amd64/amd64/sys_machdep.c releng/10.2/sys/conf/newvers.sh Modified: releng/10.2/UPDATING ============================================================================== --- releng/10.2/UPDATING Tue Oct 25 17:11:07 2016 (r307932) +++ releng/10.2/UPDATING Tue Oct 25 17:11:11 2016 (r307933) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20161025 p24 FreeBSD-SA-16:15.sysarch [revised] + + Fix incorrect argument validation in sysarch(2). [SA-16:15] + 20161010 p23 FreeBSD-SA-16:29.bspatch FreeBSD-SA-16:30.portsnap FreeBSD-SA-16:31.libarchive Modified: releng/10.2/sys/amd64/amd64/sys_machdep.c ============================================================================== --- releng/10.2/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:11:07 2016 (r307932) +++ releng/10.2/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:11:11 2016 (r307933) @@ -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); } Modified: releng/10.2/sys/conf/newvers.sh ============================================================================== --- releng/10.2/sys/conf/newvers.sh Tue Oct 25 17:11:07 2016 (r307932) +++ releng/10.2/sys/conf/newvers.sh Tue Oct 25 17:11:11 2016 (r307933) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="RELEASE-p23" +BRANCH="RELEASE-p24" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610251711.u9PHBBR8075409>