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

Michael Tuexen tuexen at FreeBSD.org
Thu May 7 03:20:01 UTC 2020


Author: tuexen
Date: Thu May  7 03:20:01 2020
New Revision: 360764
URL: https://svnweb.freebsd.org/changeset/base/360764

Log:
  MFC r357830: Improve handling of memory allocation failure
  
  Don't panic under INVARIANTS when we can't allocate memory for storing
  a vtag in time wait.
  This issue was found by running syzkaller.

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

Modified: stable/11/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/11/sys/netinet/sctp_pcb.c	Thu May  7 03:17:52 2020	(r360763)
+++ stable/11/sys/netinet/sctp_pcb.c	Thu May  7 03:20:01 2020	(r360764)
@@ -4637,9 +4637,6 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time,
 		SCTP_MALLOC(twait_block, struct sctp_tagblock *,
 		    sizeof(struct sctp_tagblock), SCTP_M_TIMW);
 		if (twait_block == NULL) {
-#ifdef INVARIANTS
-			panic("Can not alloc tagblock");
-#endif
 			return;
 		}
 		memset(twait_block, 0, sizeof(struct sctp_tagblock));


More information about the svn-src-stable mailing list