svn commit: r361476 - stable/11/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon May 25 20:17:35 UTC 2020


Author: tuexen
Date: Mon May 25 20:17:34 2020
New Revision: 361476
URL: https://svnweb.freebsd.org/changeset/base/361476

Log:
  MFC r361222: Improve ASCONF handling
  
  Avoid an integer underflow.

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	Mon May 25 20:16:06 2020	(r361475)
+++ stable/11/sys/netinet/sctp_asconf.c	Mon May 25 20:17:34 2020	(r361476)
@@ -1802,9 +1802,9 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset,
 		}		/* switch */
 
 		/* update remaining ASCONF-ACK message length to process */
-		ack_length -= SCTP_SIZE32(param_length);
-		if (ack_length <= 0) {
-			/* no more data in the mbuf chain */
+		if (ack_length > SCTP_SIZE32(param_length)) {
+			ack_length -= SCTP_SIZE32(param_length);
+		} else {
 			break;
 		}
 		offset += SCTP_SIZE32(param_length);


More information about the svn-src-stable mailing list