svn commit: r292856 - stable/9/usr.sbin/uhsoctl

Garrett Cooper ngie at FreeBSD.org
Tue Dec 29 01:09:55 UTC 2015


Author: ngie
Date: Tue Dec 29 01:09:53 2015
New Revision: 292856
URL: https://svnweb.freebsd.org/changeset/base/292856

Log:
  MFstable/10 r292855:
  
  MFC r292585:
  
  Prevent use-after-free with ctx->ns in set_nameservers(..), which could occur
  if the memory wasn't allocated again later on
  
  Reported by: Coverity
  Submitted by: Miles Ohlrich <miles.ohlrich at isilon.com>
  Sponsored by: EMC / Isilon Storage Division

Modified:
  stable/9/usr.sbin/uhsoctl/uhsoctl.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/usr.sbin/   (props changed)
  stable/9/usr.sbin/uhsoctl/   (props changed)

Modified: stable/9/usr.sbin/uhsoctl/uhsoctl.c
==============================================================================
--- stable/9/usr.sbin/uhsoctl/uhsoctl.c	Tue Dec 29 01:08:58 2015	(r292855)
+++ stable/9/usr.sbin/uhsoctl/uhsoctl.c	Tue Dec 29 01:09:53 2015	(r292856)
@@ -453,6 +453,7 @@ set_nameservers(struct ctx *ctx, const c
 			free(ctx->ns[i]);
 		}
 		free(ctx->ns);
+		ctx->ns = NULL;
 	}
 
 	fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW);


More information about the svn-src-stable-9 mailing list