Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Oct 2019 14:49:49 +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-12@freebsd.org
Subject:   svn commit: r353398 - stable/12/sys/netinet
Message-ID:  <201910101449.x9AEno70065794@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 				}
 			}



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