Author: tuexen
Date: Sat May  4 10:06:17 2019
New Revision: 347091
URL: https://svnweb.freebsd.org/changeset/base/347091

Log:
  MFC r343960:
  Fix a locking issue in the IPPROTO_SCTP level SCTP_PEER_ADDR_THLDS socket
  option. The problem affects only setsockopt with invalid parameters.
  
  This issue was found by 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 10:04:00 2019        
(r347090)
+++ stable/12/sys/netinet/sctp_usrreq.c Sat May  4 10:06:17 2019        
(r347091)
@@ -6335,6 +6335,9 @@ sctp_setopt(struct socket *so, int optname, void *optv
                                }
                        }
                        if (thlds->spt_pathcpthld != 0xffff) {
+                               if (stcb != NULL) {
+                                       SCTP_TCB_UNLOCK(stcb);
+                               }
                                error = EINVAL;
                                SCTP_LTRACE_ERR_RET(inp, NULL, NULL, 
SCTP_FROM_SCTP_USRREQ, error);
                                break;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to