Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2014 17:22:46 +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: r272263 - head/sys/netinet
Message-ID:  <201409281722.s8SHMkSt055988@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Sep 28 17:22:45 2014
New Revision: 272263
URL: http://svnweb.freebsd.org/changeset/base/272263

Log:
  Checksum coverage values larger than 65535 for UDPLite are invalid.
  Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV.
  
  Reviewed by: kevlo
  MFC after: 3 days

Modified:
  head/sys/netinet/udp_usrreq.c

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Sun Sep 28 17:16:45 2014	(r272262)
+++ head/sys/netinet/udp_usrreq.c	Sun Sep 28 17:22:45 2014	(r272263)
@@ -1017,7 +1017,7 @@ udp_ctloutput(struct socket *so, struct 
 			INP_WLOCK(inp);
 			up = intoudpcb(inp);
 			KASSERT(up != NULL, ("%s: up == NULL", __func__));
-			if (optval != 0 && optval < 8) {
+			if ((optval != 0 && optval < 8) || (optval > 65535)) {
 				INP_WUNLOCK(inp);
 				error = EINVAL;
 				break;



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