From owner-svn-src-all@FreeBSD.ORG Thu Sep 18 12:20:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DBDE846; Thu, 18 Sep 2014 12:20:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 390DDAA1; Thu, 18 Sep 2014 12:20:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8ICKKGH003341; Thu, 18 Sep 2014 12:20:20 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8ICKKOO003340; Thu, 18 Sep 2014 12:20:20 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409181220.s8ICKKOO003340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 18 Sep 2014 12:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271756 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 12:20:20 -0000 Author: dumbbell Date: Thu Sep 18 12:20:19 2014 New Revision: 271756 URL: http://svnweb.freebsd.org/changeset/base/271756 Log: vt(4): Fix out-of-bounds array access in VT_ACTIVATE ioctl handling CID: 1229964 MFC after: 3 days Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Thu Sep 18 11:52:28 2014 (r271755) +++ head/sys/dev/vt/vt_core.c Thu Sep 18 12:20:19 2014 (r271756) @@ -2131,7 +2131,7 @@ skip_thunk: win = *(int *)data - 1; DPRINTF(5, "%s%d: VT_ACTIVATE ttyv%d ", SC_DRIVER_NAME, VT_UNIT(vw), win); - if ((win > VT_MAXWINDOWS) || (win < 0)) + if ((win >= VT_MAXWINDOWS) || (win < 0)) return (EINVAL); return (vt_proc_window_switch(vd->vd_windows[win])); }