svn commit: r343960 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sun Feb 10 13:55:34 UTC 2019


Author: tuexen
Date: Sun Feb 10 13:55:32 2019
New Revision: 343960
URL: https://svnweb.freebsd.org/changeset/base/343960

Log:
  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.
  
  MFC after:		3 days

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c	Sun Feb 10 13:44:36 2019	(r343959)
+++ head/sys/netinet/sctp_usrreq.c	Sun Feb 10 13:55:32 2019	(r343960)
@@ -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;


More information about the svn-src-head mailing list