Fix a locking bug in the IPPROTO_SCTP level SCTP_EVENT socket option.

This occurs when call setsockopt() with invalid parameters.

This issue was found by syzkaller.

MFC after:		3 days
This commit is contained in:
tuexen 2019-02-10 10:42:16 +00:00
parent cd5c424771
commit fb17e65b4c

View File

@ -6115,6 +6115,10 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
SCTP_INP_RUNLOCK(inp);
}
}
} else {
if (stcb) {
SCTP_TCB_UNLOCK(stcb);
}
}
break;
}