Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2020 16:47:08 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365587 - stable/12/sys/netinet
Message-ID:  <202009101647.08AGl8xV098876@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Sep 10 16:47:08 2020
New Revision: 365587
URL: https://svnweb.freebsd.org/changeset/base/365587

Log:
  MFC r358023:
  
  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.

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

Modified: stable/12/sys/netinet/tcp_hostcache.c
==============================================================================
--- stable/12/sys/netinet/tcp_hostcache.c	Thu Sep 10 16:44:28 2020	(r365586)
+++ stable/12/sys/netinet/tcp_hostcache.c	Thu Sep 10 16:47:08 2020	(r365587)
@@ -437,8 +437,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.



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