Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2016 08:30:26 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r299619 - stable/10/sys/rpc/rpcsec_gss
Message-ID:  <201605130830.u4D8UQ5d062287@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Fri May 13 08:30:26 2016
New Revision: 299619
URL: https://svnweb.freebsd.org/changeset/base/299619

Log:
  MFC r298336:
  r298336 (by cem):
  
  kgssapi(4): Fix string overrun in Kerberos principal construction
  
  'buf.value' was previously treated as a nul-terminated string, but only
  allocated with strlen() space.  Rectify this.
  
  CID:		1007639

Modified:
  stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Fri May 13 08:25:17 2016	(r299618)
+++ stable/10/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Fri May 13 08:30:26 2016	(r299619)
@@ -331,7 +331,7 @@ rpc_gss_get_principal_name(rpc_gss_princ
 	 * Construct a gss_buffer containing the full name formatted
 	 * as "name/node@domain" where node and domain are optional.
 	 */
-	namelen = strlen(name);
+	namelen = strlen(name) + 1;
 	if (node) {
 		namelen += strlen(node) + 1;
 	}



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