svn commit: r360706 - stable/11/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed May 6 22:02:02 UTC 2020
Author: tuexen
Date: Wed May 6 22:02:01 2020
New Revision: 360706
URL: https://svnweb.freebsd.org/changeset/base/360706
Log:
MFC r349998: Improve SCTP socket state handling
Fix socket state handling when freeing an SCTP endpoint.
This issue was found by runing syzkaller.
Modified:
stable/11/sys/netinet/sctp_pcb.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/11/sys/netinet/sctp_pcb.c Wed May 6 21:59:58 2020 (r360705)
+++ stable/11/sys/netinet/sctp_pcb.c Wed May 6 22:02:01 2020 (r360706)
@@ -4911,12 +4911,11 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tc
inp->sctp_flags |= SCTP_PCB_FLAGS_WAS_CONNECTED;
if (so) {
SOCK_LOCK(so);
- 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);
More information about the svn-src-stable-11
mailing list