Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 2015 20:48:58 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r287146 - in releng/10.1: . crypto/openssh sys/amd64/amd64 sys/conf sys/modules/ixgbe usr.sbin/pkg
Message-ID:  <201508252048.t7PKmw3B051102@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Aug 25 20:48:58 2015
New Revision: 287146
URL: https://svnweb.freebsd.org/changeset/base/287146

Log:
  Fix local privilege escalation in IRET handler. [SA-15:21]
  
  Fix OpenSSH multiple vulnerabilities. [SA-15:22]
  
  Disabled ixgbe(4) flow-director support. [EN-15:14]
  
  Fix insufficient check of unsupported pkg(7) signature methods.
  [EN-15:15]
  
  Approved by:	so

Modified:
  releng/10.1/UPDATING
  releng/10.1/crypto/openssh/monitor.c
  releng/10.1/crypto/openssh/monitor_wrap.c
  releng/10.1/crypto/openssh/mux.c
  releng/10.1/sys/amd64/amd64/exception.S
  releng/10.1/sys/amd64/amd64/machdep.c
  releng/10.1/sys/amd64/amd64/trap.c
  releng/10.1/sys/conf/files
  releng/10.1/sys/conf/newvers.sh
  releng/10.1/sys/modules/ixgbe/Makefile
  releng/10.1/usr.sbin/pkg/pkg.c

Modified: releng/10.1/UPDATING
==============================================================================
--- releng/10.1/UPDATING	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/UPDATING	Tue Aug 25 20:48:58 2015	(r287146)
@@ -16,6 +16,20 @@ 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.
 
+20150825:	p19	FreeBSD-SA-15:21.amd64
+			FreeBSD-SA-15:22.openssh
+			FreeBSD-EN-15:14.ixgbe
+			FreeBSD-EN-15:15.pkg
+
+	Fix local privilege escalation in IRET handler. [SA-15:21]
+
+	Fix OpenSSH multiple vulnerabilities. [SA-15:22]
+
+	Disabled ixgbe(4) flow-director support. [EN-15:14]
+
+	Fix insufficient check of unsupported pkg(7) signature methods.
+	[EN-15:15]
+
 20150818:	p18	FreeBSD-SA-15:20.expat
 
 	Fix multiple integer overflows in expat (libbsdxml) XML parser.

Modified: releng/10.1/crypto/openssh/monitor.c
==============================================================================
--- releng/10.1/crypto/openssh/monitor.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/crypto/openssh/monitor.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -1027,9 +1027,7 @@ extern KbdintDevice sshpam_device;
 int
 mm_answer_pam_init_ctx(int sock, Buffer *m)
 {
-
 	debug3("%s", __func__);
-	authctxt->user = buffer_get_string(m, NULL);
 	sshpam_ctxt = (sshpam_device.init_ctx)(authctxt);
 	sshpam_authok = NULL;
 	buffer_clear(m);
@@ -1111,14 +1109,16 @@ mm_answer_pam_respond(int sock, Buffer *
 int
 mm_answer_pam_free_ctx(int sock, Buffer *m)
 {
+	int r = sshpam_authok != NULL && sshpam_authok == sshpam_ctxt;
 
 	debug3("%s", __func__);
 	(sshpam_device.free_ctx)(sshpam_ctxt);
+	sshpam_ctxt = sshpam_authok = NULL;
 	buffer_clear(m);
 	mm_request_send(sock, MONITOR_ANS_PAM_FREE_CTX, m);
 	auth_method = "keyboard-interactive";
 	auth_submethod = "pam";
-	return (sshpam_authok == sshpam_ctxt);
+	return r;
 }
 #endif
 

Modified: releng/10.1/crypto/openssh/monitor_wrap.c
==============================================================================
--- releng/10.1/crypto/openssh/monitor_wrap.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/crypto/openssh/monitor_wrap.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -820,7 +820,6 @@ mm_sshpam_init_ctx(Authctxt *authctxt)
 
 	debug3("%s", __func__);
 	buffer_init(&m);
-	buffer_put_cstring(&m, authctxt->user);
 	mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_PAM_INIT_CTX, &m);
 	debug3("%s: waiting for MONITOR_ANS_PAM_INIT_CTX", __func__);
 	mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_PAM_INIT_CTX, &m);

Modified: releng/10.1/crypto/openssh/mux.c
==============================================================================
--- releng/10.1/crypto/openssh/mux.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/crypto/openssh/mux.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -633,7 +633,8 @@ process_mux_open_fwd(u_int rid, Channel 
 	u_int lport, cport;
 	int i, ret = 0, freefwd = 1;
 
-	fwd.listen_host = fwd.connect_host = NULL;
+	memset(&fwd, 0, sizeof(fwd));
+
 	if (buffer_get_int_ret(&ftype, m) != 0 ||
 	    (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
 	    buffer_get_int_ret(&lport, m) != 0 ||
@@ -783,7 +784,8 @@ process_mux_close_fwd(u_int rid, Channel
 	int i, listen_port, ret = 0;
 	u_int lport, cport;
 
-	fwd.listen_host = fwd.connect_host = NULL;
+	memset(&fwd, 0, sizeof(fwd));
+
 	if (buffer_get_int_ret(&ftype, m) != 0 ||
 	    (fwd.listen_host = buffer_get_string_ret(m, NULL)) == NULL ||
 	    buffer_get_int_ret(&lport, m) != 0 ||

Modified: releng/10.1/sys/amd64/amd64/exception.S
==============================================================================
--- releng/10.1/sys/amd64/amd64/exception.S	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/amd64/amd64/exception.S	Tue Aug 25 20:48:58 2015	(r287146)
@@ -154,9 +154,13 @@ IDTVEC(xmm)
 IDTVEC(tss)
 	TRAP_ERR(T_TSSFLT)
 IDTVEC(missing)
-	TRAP_ERR(T_SEGNPFLT)
+	subq	$TF_ERR,%rsp
+	movl	$T_SEGNPFLT,TF_TRAPNO(%rsp)
+	jmp	prot_addrf
 IDTVEC(stk)
-	TRAP_ERR(T_STKFLT)
+	subq	$TF_ERR,%rsp
+	movl	$T_STKFLT,TF_TRAPNO(%rsp)
+	jmp	prot_addrf
 IDTVEC(align)
 	TRAP_ERR(T_ALIGNFLT)
 
@@ -319,6 +323,7 @@ IDTVEC(page)
 IDTVEC(prot)
 	subq	$TF_ERR,%rsp
 	movl	$T_PROTFLT,TF_TRAPNO(%rsp)
+prot_addrf:
 	movq	$0,TF_ADDR(%rsp)
 	movq	%rdi,TF_RDI(%rsp)	/* free up a GP register */
 	leaq	doreti_iret(%rip),%rdi

Modified: releng/10.1/sys/amd64/amd64/machdep.c
==============================================================================
--- releng/10.1/sys/amd64/amd64/machdep.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/amd64/amd64/machdep.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -433,6 +433,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, 
 	regs->tf_rflags &= ~(PSL_T | PSL_D);
 	regs->tf_cs = _ucodesel;
 	regs->tf_ds = _udatasel;
+	regs->tf_ss = _udatasel;
 	regs->tf_es = _udatasel;
 	regs->tf_fs = _ufssel;
 	regs->tf_gs = _ugssel;

Modified: releng/10.1/sys/amd64/amd64/trap.c
==============================================================================
--- releng/10.1/sys/amd64/amd64/trap.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/amd64/amd64/trap.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -457,8 +457,6 @@ trap(struct trapframe *frame)
 			goto out;
 
 		case T_STKFLT:		/* stack fault */
-			break;
-
 		case T_PROTFLT:		/* general protection fault */
 		case T_SEGNPFLT:	/* segment not present fault */
 			if (td->td_intr_nesting_level != 0)

Modified: releng/10.1/sys/conf/files
==============================================================================
--- releng/10.1/sys/conf/files	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/conf/files	Tue Aug 25 20:48:58 2015	(r287146)
@@ -1704,7 +1704,7 @@ dev/ixgb/if_ixgb.c		optional ixgb
 dev/ixgb/ixgb_ee.c		optional ixgb
 dev/ixgb/ixgb_hw.c		optional ixgb
 dev/ixgbe/ixgbe.c		optional ixgbe inet \
-	compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP -DIXGBE_FDIR"
+	compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP"
 dev/ixgbe/ixv.c			optional ixgbe inet \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/ixgbe/ixgbe_phy.c		optional ixgbe inet \

Modified: releng/10.1/sys/conf/newvers.sh
==============================================================================
--- releng/10.1/sys/conf/newvers.sh	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/conf/newvers.sh	Tue Aug 25 20:48:58 2015	(r287146)
@@ -32,7 +32,7 @@
 
 TYPE="FreeBSD"
 REVISION="10.1"
-BRANCH="RELEASE-p18"
+BRANCH="RELEASE-p19"
 if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
 	BRANCH=${BRANCH_OVERRIDE}
 fi

Modified: releng/10.1/sys/modules/ixgbe/Makefile
==============================================================================
--- releng/10.1/sys/modules/ixgbe/Makefile	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/sys/modules/ixgbe/Makefile	Tue Aug 25 20:48:58 2015	(r287146)
@@ -12,7 +12,7 @@ SRCS    += ixgbe.c ixv.c
 SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_mbx.c ixgbe_vf.c
 SRCS    += ixgbe_dcb.c ixgbe_dcb_82598.c ixgbe_dcb_82599.c
 SRCS    += ixgbe_82599.c ixgbe_82598.c ixgbe_x540.c
-CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP -DIXGBE_FDIR
+CFLAGS+= -I${.CURDIR}/../../dev/ixgbe -DSMP
 
 .if !defined(KERNBUILDDIR)
 .if ${MK_INET_SUPPORT} != "no"

Modified: releng/10.1/usr.sbin/pkg/pkg.c
==============================================================================
--- releng/10.1/usr.sbin/pkg/pkg.c	Tue Aug 25 20:48:51 2015	(r287145)
+++ releng/10.1/usr.sbin/pkg/pkg.c	Tue Aug 25 20:48:58 2015	(r287146)
@@ -774,7 +774,13 @@ bootstrap_pkg(bool force)
 		goto fetchfail;
 
 	if (signature_type != NULL &&
-	    strcasecmp(signature_type, "FINGERPRINTS") == 0) {
+	    strcasecmp(signature_type, "NONE") != 0) {
+		if (strcasecmp(signature_type, "FINGERPRINTS") != 0) {
+			warnx("Signature type %s is not supported for "
+			    "bootstrapping.", signature_type);
+			goto cleanup;
+		}
+
 		snprintf(tmpsig, MAXPATHLEN, "%s/pkg.txz.sig.XXXXXX",
 		    getenv("TMPDIR") ? getenv("TMPDIR") : _PATH_TMP);
 		snprintf(url, MAXPATHLEN, "%s/Latest/pkg.txz.sig",
@@ -854,7 +860,13 @@ bootstrap_pkg_local(const char *pkgpath,
 		return (-1);
 	}
 	if (signature_type != NULL &&
-	    strcasecmp(signature_type, "FINGERPRINTS") == 0) {
+	    strcasecmp(signature_type, "NONE") != 0) {
+		if (strcasecmp(signature_type, "FINGERPRINTS") != 0) {
+			warnx("Signature type %s is not supported for "
+			    "bootstrapping.", signature_type);
+			goto cleanup;
+		}
+
 		snprintf(path, sizeof(path), "%s.sig", pkgpath);
 
 		if ((fd_sig = open(path, O_RDONLY)) == -1) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508252048.t7PKmw3B051102>