From owner-svn-src-all@freebsd.org Tue Oct 25 17:11:17 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CB3BC21E93; Tue, 25 Oct 2016 17:11:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19869D88; Tue, 25 Oct 2016 17:11:17 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PHBG8k075464; Tue, 25 Oct 2016 17:11:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PHBFJE075461; Tue, 25 Oct 2016 17:11:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610251711.u9PHBFJE075461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Oct 2016 17:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r307934 - in releng/10.3: . sys/amd64/amd64 sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 17:11:17 -0000 Author: glebius Date: Tue Oct 25 17:11:15 2016 New Revision: 307934 URL: https://svnweb.freebsd.org/changeset/base/307934 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.3/UPDATING releng/10.3/sys/amd64/amd64/sys_machdep.c releng/10.3/sys/conf/newvers.sh Modified: releng/10.3/UPDATING ============================================================================== --- releng/10.3/UPDATING Tue Oct 25 17:11:11 2016 (r307933) +++ releng/10.3/UPDATING Tue Oct 25 17:11:15 2016 (r307934) @@ -16,6 +16,12 @@ 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 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 Modified: releng/10.3/sys/amd64/amd64/sys_machdep.c ============================================================================== --- releng/10.3/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:11:11 2016 (r307933) +++ releng/10.3/sys/amd64/amd64/sys_machdep.c Tue Oct 25 17:11:15 2016 (r307934) @@ -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.3/sys/conf/newvers.sh ============================================================================== --- releng/10.3/sys/conf/newvers.sh Tue Oct 25 17:11:11 2016 (r307933) +++ releng/10.3/sys/conf/newvers.sh Tue Oct 25 17:11:15 2016 (r307934) @@ -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