Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2020 03:20:01 +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-11@freebsd.org
Subject:   svn commit: r360764 - stable/11/sys/netinet
Message-ID:  <202005070320.0473K1Hf027012@repo.freebsd.org>

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



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