svn commit: r360765 - stable/11/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu May 7 03:22:58 UTC 2020


Author: tuexen
Date: Thu May  7 03:22:57 2020
New Revision: 360765
URL: https://svnweb.freebsd.org/changeset/base/360765

Log:
  MFC r358023: Don't use uninitialized memory
  
  Don't use uninitialised stack memory if the sysctl variable
  net.inet.tcp.hostcache.enable is set to 0.
  The bug resulted in using possibly a too small MSS value or wrong
  initial retransmission timer settings. Possibly the value used
  for ssthresh was also wrong.
  
  Submitted by:		rscheff
  Reviewed by:		Cheng Cui, rgrimes@, tuexen@
  Differential Revision:	https://reviews.freebsd.org/D23687

Modified:
  stable/11/sys/netinet/tcp_hostcache.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_hostcache.c
==============================================================================
--- stable/11/sys/netinet/tcp_hostcache.c	Thu May  7 03:20:01 2020	(r360764)
+++ stable/11/sys/netinet/tcp_hostcache.c	Thu May  7 03:22:57 2020	(r360765)
@@ -435,8 +435,10 @@ tcp_hc_get(struct in_conninfo *inc, struct hc_metrics_
 {
 	struct hc_metrics *hc_entry;
 
-	if (!V_tcp_use_hostcache)
+	if (!V_tcp_use_hostcache) {
+		bzero(hc_metrics_lite, sizeof(*hc_metrics_lite));
 		return;
+	}
 
 	/*
 	 * Find the right bucket.


More information about the svn-src-all mailing list