svn commit: r254352 - stable/9/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu Aug 15 04:25:16 UTC 2013
Author: tuexen
Date: Thu Aug 15 04:25:16 2013
New Revision: 254352
URL: http://svnweb.freebsd.org/changeset/base/254352
Log:
MFC r254338:
Don't send uninitialized memory (two instances of 4 bytes) in
every cookie on the wire. This bug was reported in
https://bugzilla.mozilla.org/show_bug.cgi?id=905080
Modified:
stable/9/sys/netinet/sctp_output.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/netinet/sctp_output.c
==============================================================================
--- stable/9/sys/netinet/sctp_output.c Thu Aug 15 04:10:15 2013 (r254351)
+++ stable/9/sys/netinet/sctp_output.c Thu Aug 15 04:25:16 2013 (r254352)
@@ -5410,6 +5410,14 @@ do_a_abort:
}
SCTP_BUF_LEN(m) = sizeof(struct sctp_init_chunk);
+ /*
+ * We might not overwrite the identification[] completely and on
+ * some platforms time_entered will contain some padding. Therefore
+ * zero out the cookie to avoid putting uninitialized memory on the
+ * wire.
+ */
+ memset(&stc, 0, sizeof(struct sctp_state_cookie));
+
/* the time I built cookie */
(void)SCTP_GETTIME_TIMEVAL(&stc.time_entered);
More information about the svn-src-stable-9
mailing list