mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-31 16:57:10 +00:00
Fix locking for IPPROTO_SCTP level SCTP_DEFAULT_PRINFO socket option.
This problem occurred when calling setsockopt() will invalid parameters. This issue was found by running syzkaller. MFC after: 3 days
This commit is contained in:
parent
f6f8a42129
commit
333669e016
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343951
@ -6209,6 +6209,9 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
|
||||
SCTP_FIND_STCB(inp, stcb, info->pr_assoc_id);
|
||||
|
||||
if (info->pr_policy > SCTP_PR_SCTP_MAX) {
|
||||
if (stcb) {
|
||||
SCTP_TCB_UNLOCK(stcb);
|
||||
}
|
||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
|
||||
error = EINVAL;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user