1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Plumb an mbuf leak found by Mark Wodrich from Google by fuzz testing the

userland stack and reporting it in:
https://github.com/sctplab/usrsctp/issues/396

MFC after:		3 days
This commit is contained in:
Michael Tuexen 2019-10-05 12:34:50 +00:00
parent 6777f10c48
commit 0941b9dc37
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353122

View File

@ -465,6 +465,10 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset,
if (!cookie_found) {
uint16_t len;
/* Only report the missing cookie parameter */
if (op_err != NULL) {
sctp_m_freem(op_err);
}
len = (uint16_t)(sizeof(struct sctp_error_missing_param) + sizeof(uint16_t));
/* We abort with an error of missing mandatory param */
op_err = sctp_get_mbuf_for_msg(len, 0, M_NOWAIT, 1, MT_DATA);