summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2006-02-07 19:59:46 +0000
committerqingli <qingli@FreeBSD.org>2006-02-07 19:59:46 +0000
commit403a98127da977ef0ebc6b21c67aea9b1dd2810f (patch)
tree5117453065e22334646c0c67e13708d49c4637df /sys/netinet/tcp_syncache.c
parentf2894d18f677982f38448279ee02f7c365c8349f (diff)
downloadFreeBSD-src-403a98127da977ef0ebc6b21c67aea9b1dd2810f.zip
FreeBSD-src-403a98127da977ef0ebc6b21c67aea9b1dd2810f.tar.gz
Fixes a crash due to the memory of the newly allocated syncache entry
in syncache_lookup() is not cleared and may lead to an arbitrary and bogus rtentry pointer which later gets free'd. Reviewed by: andre MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 96ad866..55e285a 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1386,6 +1386,7 @@ syncookie_lookup(inc, th, so)
* Fill in the syncache values.
* XXX duplicate code from syncache_add
*/
+ bzero(sc, sizeof(*sc));
sc->sc_ipopts = NULL;
sc->sc_inc.inc_fport = inc->inc_fport;
sc->sc_inc.inc_lport = inc->inc_lport;
OpenPOWER on IntegriCloud