sctp: don't refer to a potentially outdated stream

Reported by:	syzbot+1593381019112e5bb35c@syzkaller.appspotmail.com
MFC after:	3 days
This commit is contained in:
Michael Tuexen 2022-04-02 23:26:27 +02:00
parent b30b7a140c
commit 52106f072f

View File

@ -13401,6 +13401,8 @@ sctp_lower_sosend(struct socket *so,
KASSERT((asoc->state & SCTP_STATE_WAS_ABORTED) == 0,
("Association was aborted"));
/* The out streams might be reallocated. */
strm = &asoc->strmout[srcv->sinfo_stream];
if (sp != NULL) {
if (sp->msg_is_complete == 0) {
strm->last_msg_incomplete = 1;