Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2019 08:45:55 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r347658 - stable/11/sys/netinet
Message-ID:  <201905160845.x4G8jteO023474@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu May 16 08:45:54 2019
New Revision: 347658
URL: https://svnweb.freebsd.org/changeset/base/347658

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/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:44:12 2019	(r347657)
+++ stable/11/sys/netinet/sctp_usrreq.c	Thu May 16 08:45:54 2019	(r347658)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905160845.x4G8jteO023474>