mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
Fix socket state handling when freeing an SCTP endpoint.
This issue was found by runing syzkaller. MFC after: 1 week
This commit is contained in:
parent
6c35c7d1b6
commit
25fa310a5f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349998
@ -4912,12 +4912,11 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
|
||||
inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED;
|
||||
if (so) {
|
||||
SOCKBUF_LOCK(&so->so_rcv);
|
||||
if (so->so_rcv.sb_cc == 0) {
|
||||
so->so_state &= ~(SS_ISCONNECTING |
|
||||
SS_ISDISCONNECTING |
|
||||
SS_ISCONFIRMING |
|
||||
SS_ISCONNECTED);
|
||||
}
|
||||
so->so_state &= ~(SS_ISCONNECTING |
|
||||
SS_ISDISCONNECTING |
|
||||
SS_ISCONFIRMING |
|
||||
SS_ISCONNECTED);
|
||||
so->so_state |= SS_ISDISCONNECTED;
|
||||
socantrcvmore_locked(so);
|
||||
socantsendmore(so);
|
||||
sctp_sowwakeup(inp, so);
|
||||
|
Loading…
Reference in New Issue
Block a user