From owner-svn-src-stable-8@FreeBSD.ORG Sat Oct 6 19:01:32 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 824141065846; Sat, 6 Oct 2012 19:01:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 681D58FC18; Sat, 6 Oct 2012 19:01:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J1WiB021182; Sat, 6 Oct 2012 19:01:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J1WvR021180; Sat, 6 Oct 2012 19:01:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061901.q96J1WvR021180@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241275 - stable/8/sys/boot/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:01:32 -0000 Author: avg Date: Sat Oct 6 19:01:31 2012 New Revision: 241275 URL: http://svn.freebsd.org/changeset/base/241275 Log: MFC r240349: zfs boot: add a size check for a value in fzap_lookup Modified: stable/8/sys/boot/zfs/zfsimpl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) Modified: stable/8/sys/boot/zfs/zfsimpl.c ============================================================================== --- stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:01:20 2012 (r241274) +++ stable/8/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:01:31 2012 (r241275) @@ -1289,6 +1289,8 @@ fzap_lookup(const spa_t *spa, const dnod zc = &ZAP_LEAF_CHUNK(&zl, zc->l_entry.le_next); } if (fzap_name_equal(&zl, zc, name)) { + if (zc->l_entry.le_value_intlen * zc->l_entry.le_value_numints > 8) + return (E2BIG); *value = fzap_leaf_value(&zl, zc); return (0); }