Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Sep 2019 13:15:25 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352652 - head/sys/netinet
Message-ID:  <201909241315.x8ODFPlq060300@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Tue Sep 24 13:15:24 2019
New Revision: 352652
URL: https://svnweb.freebsd.org/changeset/base/352652

Log:
  Plumb a memory leak.
  Thnanks to Felix Weinrank for finding this issue using fuzz testing
  and reporting it for the userland stack:
  https://github.com/sctplab/usrsctp/issues/378
  
  MFC after:		3 days

Modified:
  head/sys/netinet/sctp_indata.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c	Tue Sep 24 12:21:01 2019	(r352651)
+++ head/sys/netinet/sctp_indata.c	Tue Sep 24 13:15:24 2019	(r352652)
@@ -472,6 +472,11 @@ sctp_clean_up_control(struct sctp_tcb *stcb, struct sc
 		chk->data = NULL;
 		sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
 	}
+	sctp_free_remote_addr(control->whoFrom);
+	if (control->data) {
+		sctp_m_freem(control->data);
+		control->data = NULL;
+	}
 	sctp_free_a_readq(stcb, control);
 }
 



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