Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2012 00:15:13 +0000 (UTC)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r232370 - stable/8/sys/kern
Message-ID:  <201203020015.q220FDpD004230@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hrs
Date: Fri Mar  2 00:15:13 2012
New Revision: 232370
URL: http://svn.freebsd.org/changeset/base/232370

Log:
  MFC r230981: Fix input validation in SO_SETFIB socket option.
  
  Approved by:	re (bz)

Modified:
  stable/8/sys/kern/uipc_socket.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/uipc_socket.c
==============================================================================
--- stable/8/sys/kern/uipc_socket.c	Thu Mar  1 22:36:42 2012	(r232369)
+++ stable/8/sys/kern/uipc_socket.c	Fri Mar  2 00:15:13 2012	(r232370)
@@ -2492,7 +2492,7 @@ sosetopt(struct socket *so, struct socko
 		case SO_SETFIB:
 			error = sooptcopyin(sopt, &optval, sizeof optval,
 					    sizeof optval);
-			if (optval < 0 || optval > rt_numfibs) {
+			if (optval < 0 || optval >= rt_numfibs) {
 				error = EINVAL;
 				goto bad;
 			}



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