svn commit: r347084 - stable/12/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat May 4 09:15:58 UTC 2019
Author: tuexen
Date: Sat May 4 09:15:57 2019
New Revision: 347084
URL: https://svnweb.freebsd.org/changeset/base/347084
Log:
MFC r343769:
Fix an off-by-one error in the input validation of the SCTP_RESET_STREAMS
socketoption.
This was found by running syzkaller.
Modified:
stable/12/sys/netinet/sctp_usrreq.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/12/sys/netinet/sctp_usrreq.c Sat May 4 09:13:52 2019 (r347083)
+++ stable/12/sys/netinet/sctp_usrreq.c Sat May 4 09:15:57 2019 (r347084)
@@ -4654,13 +4654,13 @@ sctp_setopt(struct socket *so, int optname, void *optv
}
for (i = 0; i < strrst->srs_number_streams; i++) {
if ((send_in) &&
- (strrst->srs_stream_list[i] > stcb->asoc.streamincnt)) {
+ (strrst->srs_stream_list[i] >= stcb->asoc.streamincnt)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
break;
}
if ((send_out) &&
- (strrst->srs_stream_list[i] > stcb->asoc.streamoutcnt)) {
+ (strrst->srs_stream_list[i] >= stcb->asoc.streamoutcnt)) {
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL);
error = EINVAL;
break;
More information about the svn-src-all
mailing list