Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2020 02:03:26 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r360741 - stable/11/sys/netinet
Message-ID:  <202005070203.04723Qf3081173@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu May  7 02:03:25 2020
New Revision: 360741
URL: https://svnweb.freebsd.org/changeset/base/360741

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

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

Modified: stable/11/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/11/sys/netinet/sctp_asconf.c	Thu May  7 02:01:04 2020	(r360740)
+++ stable/11/sys/netinet/sctp_asconf.c	Thu May  7 02:03:25 2020	(r360741)
@@ -697,8 +697,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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005070203.04723Qf3081173>