Date: Thu, 15 Aug 2013 05:14:20 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r254355 - releng/9.2/sys/netinet Message-ID: <201308150514.r7F5EKbK052363@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Thu Aug 15 05:14:20 2013 New Revision: 254355 URL: http://svnweb.freebsd.org/changeset/base/254355 Log: MFC r254352: 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 Approved by: re@ Modified: releng/9.2/sys/netinet/sctp_output.c Directory Properties: releng/9.2/sys/ (props changed) Modified: releng/9.2/sys/netinet/sctp_output.c ============================================================================== --- releng/9.2/sys/netinet/sctp_output.c Thu Aug 15 04:35:25 2013 (r254354) +++ releng/9.2/sys/netinet/sctp_output.c Thu Aug 15 05:14:20 2013 (r254355) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308150514.r7F5EKbK052363>