svn commit: r353397 - stable/12/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Oct 10 14:48:49 UTC 2019


Author: tuexen
Date: Thu Oct 10 14:48:48 2019
New Revision: 353397
URL: https://svnweb.freebsd.org/changeset/base/353397

Log:
  MFC r353071:
  
  When skipping the address parameter, take the padding into account.

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

Modified: stable/12/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/12/sys/netinet/sctp_asconf.c	Thu Oct 10 14:47:39 2019	(r353396)
+++ stable/12/sys/netinet/sctp_asconf.c	Thu Oct 10 14:48:48 2019	(r353397)
@@ -699,8 +699,8 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset
 		sctp_m_freem(m_ack);
 		return;
 	}
-	/* param_length is already validated in process_control... */
-	offset += ntohs(p_addr->ph.param_length);	/* skip lookup addr */
+	/* skip lookup addr */
+	offset += SCTP_SIZE32(ntohs(p_addr->ph.param_length));
 	/* get pointer to first asconf param in ASCONF */
 	aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *)&aparam_buf);
 	if (aph == NULL) {


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