Author: tuexen
Date: Thu May 16 08:44:12 2019
New Revision: 347657
URL: https://svnweb.freebsd.org/changeset/base/347657

Log:
  MFC r343954:
  
  Fix a locking bug in the IPPROTO_SCTP level SCTP_EVENT socket option.
  This occurs when call setsockopt() with invalid parameters.
  
  This issue was found by syzkaller.

Modified:
  stable/11/sys/netinet/sctp_usrreq.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_usrreq.c
==============================================================================
--- stable/11/sys/netinet/sctp_usrreq.c Thu May 16 08:42:20 2019        
(r347656)
+++ stable/11/sys/netinet/sctp_usrreq.c Thu May 16 08:44:12 2019        
(r347657)
@@ -6115,6 +6115,10 @@ sctp_setopt(struct socket *so, int optname, void *optv
                                                SCTP_INP_RUNLOCK(inp);
                                        }
                                }
+                       } else {
+                               if (stcb) {
+                                       SCTP_TCB_UNLOCK(stcb);
+                               }
                        }
                        break;
                }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to