Skip to content

Commit

Permalink
Fix the handling of invalid parameters in ASCONF chunks.
Browse files Browse the repository at this point in the history
Thanks to Mark Wodrich from Google for reporting the issue in
#376
for the userland stack.
  • Loading branch information
tuexen committed Sep 20, 2019
1 parent 8ca1321 commit ac36440
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion usrsctplib/netinet/sctp_asconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#ifdef __FreeBSD__
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 350745 2019-08-08 08:23:27Z tuexen $");
__FBSDID("$FreeBSD: head/sys/netinet/sctp_asconf.c 352550 2019-09-20 08:20:20Z tuexen $");
#endif

#include <netinet/sctp_os.h>
Expand Down Expand Up @@ -720,6 +720,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset,
if (param_length <= sizeof(struct sctp_paramhdr)) {
SCTPDBG(SCTP_DEBUG_ASCONF1, "handle_asconf: param length (%u) too short\n", param_length);
sctp_m_freem(m_ack);
return;
}
/* get the entire parameter */
aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, param_length, aparam_buf);
Expand Down

0 comments on commit ac36440

Please sign in to comment.