svn commit: r266057 - stable/9/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Wed May 14 17:28:50 UTC 2014


Author: tuexen
Date: Wed May 14 17:28:49 2014
New Revision: 266057
URL: http://svnweb.freebsd.org/changeset/base/266057

Log:
  MFC r257803:
  
  Make sure that we don't try to build an ASCONF-ACK chunk
  larger than what fits in the the mbuf cluster.
  This issue was reported by Andrew Galante.

Modified:
  stable/9/sys/netinet/sctp_asconf.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/9/sys/netinet/sctp_asconf.c	Wed May 14 17:26:06 2014	(r266056)
+++ stable/9/sys/netinet/sctp_asconf.c	Wed May 14 17:28:49 2014	(r266057)
@@ -2616,7 +2616,8 @@ sctp_compose_asconf(struct sctp_tcb *stc
 		/* get the parameter length */
 		p_length = SCTP_SIZE32(aa->ap.aph.ph.param_length);
 		/* will it fit in current chunk? */
-		if (SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) {
+		if ((SCTP_BUF_LEN(m_asconf) + p_length > stcb->asoc.smallest_mtu) ||
+		    (SCTP_BUF_LEN(m_asconf) + p_length > MCLBYTES)) {
 			/* won't fit, so we're done with this chunk */
 			break;
 		}


More information about the svn-src-stable-9 mailing list