From owner-svn-src-stable@freebsd.org Fri Jul 8 20:40:51 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B22C0B853D0; Fri, 8 Jul 2016 20:40:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 820DA1CEE; Fri, 8 Jul 2016 20:40:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Keoea054871; Fri, 8 Jul 2016 20:40:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68KeoYH054870; Fri, 8 Jul 2016 20:40:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201607082040.u68KeoYH054870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 8 Jul 2016 20:40:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r302454 - stable/9/usr.sbin/rpcbind X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 20:40:51 -0000 Author: ngie Date: Fri Jul 8 20:40:50 2016 New Revision: 302454 URL: https://svnweb.freebsd.org/changeset/base/302454 Log: MFstable/10 r302453: MFC r301605: Bounds check rpcbs_rmtcall(..) to ensure rtype is less than RPCBVERS_STAT Not returning if rtype == RPCBVERS_STAT will cause us to overrun the inf array, as it's defined to be exactly RPCBVERS_STAT elements in rpcb_prot.x: > include/rpc/rpcb_prot.x:typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; The proposed change also matches the rest of the rtype upper bound checks in the file, so the original change was likely a typo. CID: 1007567 Modified: stable/9/usr.sbin/rpcbind/rpcb_stat.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/usr.sbin/rpcbind/rpcb_stat.c ============================================================================== --- stable/9/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:39:37 2016 (r302453) +++ stable/9/usr.sbin/rpcbind/rpcb_stat.c Fri Jul 8 20:40:50 2016 (r302454) @@ -152,7 +152,7 @@ rpcbs_rmtcall(rpcvers_t rtype, rpcproc_t rpcbs_rmtcalllist *rl; struct netconfig *nconf; - if (rtype > RPCBVERS_STAT) + if (rtype >= RPCBVERS_STAT) return; for (rl = inf[rtype].rmtinfo; rl; rl = rl->next) {