aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@FreeBSD.org>2020-05-07 03:20:01 +0000
committerMichael Tuexen <tuexen@FreeBSD.org>2020-05-07 03:20:01 +0000
commite2d83e5b75792258ae77325c3784c1d13be52236 (patch)
treeddfec25e9b70b625b569cdea38075e95a287045f
parent2f55bf9529b8450bfc8eecc730239790732163cd (diff)
downloadsrc-e2d83e5b75792258ae77325c3784c1d13be52236.tar.gz
src-e2d83e5b75792258ae77325c3784c1d13be52236.zip
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.
Notes
Notes: svn path=/stable/11/; revision=360764
-rw-r--r--sys/netinet/sctp_pcb.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 4f68c215f5e8..b82ebedcffe1 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -4637,9 +4637,6 @@ sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, uint16_t lport, uint16_t
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));