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

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


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

Log:
  MFC r353119:
  
  Fix the adding of padding to COOKIE-ECHO chunks.
  
  Thanks to Mark Wodrich who found this issue while fuzz testing the
  usrsctp stack and reported the issue in
  https://github.com/sctplab/usrsctp/issues/382

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

Modified: stable/12/sys/netinet/sctp_output.c
==============================================================================
--- stable/12/sys/netinet/sctp_output.c	Thu Oct 10 14:48:48 2019	(r353397)
+++ stable/12/sys/netinet/sctp_output.c	Thu Oct 10 14:49:49 2019	(r353398)
@@ -9059,8 +9059,7 @@ sctp_send_cookie_echo(struct mbuf *m,
 				pad = 4 - pad;
 			}
 			if (pad > 0) {
-				cookie = sctp_pad_lastmbuf(cookie, pad, NULL);
-				if (cookie == NULL) {
+				if (sctp_pad_lastmbuf(cookie, pad, NULL) == NULL) {
 					return (-8);
 				}
 			}


More information about the svn-src-all mailing list