From owner-svn-src-all@FreeBSD.ORG Thu Aug 15 04:35:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D502C57; Thu, 15 Aug 2013 04:35:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48E4D2139; Thu, 15 Aug 2013 04:35:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7F4ZQZC037359; Thu, 15 Aug 2013 04:35:26 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7F4ZQGL037358; Thu, 15 Aug 2013 04:35:26 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201308150435.r7F4ZQGL037358@svn.freebsd.org> From: Michael Tuexen Date: Thu, 15 Aug 2013 04:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r254354 - stable/8/sys/netinet X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Aug 2013 04:35:26 -0000 Author: tuexen Date: Thu Aug 15 04:35:25 2013 New Revision: 254354 URL: http://svnweb.freebsd.org/changeset/base/254354 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/8/sys/netinet/sctp_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet/ (props changed) Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Thu Aug 15 04:27:10 2013 (r254353) +++ stable/8/sys/netinet/sctp_output.c Thu Aug 15 04:35:25 2013 (r254354) @@ -5415,6 +5415,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);