Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2019 13:55:33 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343960 - head/sys/netinet
Message-ID:  <201902101355.x1ADtXcd018427@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



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