From owner-svn-src-all@FreeBSD.ORG Wed Feb 18 22:29:53 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5C8F5DC; Wed, 18 Feb 2015 22:29:53 +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 CFDEC944; Wed, 18 Feb 2015 22:29:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1IMTrBC043780; Wed, 18 Feb 2015 22:29:53 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1IMTrY0043779; Wed, 18 Feb 2015 22:29:53 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201502182229.t1IMTrY0043779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 18 Feb 2015 22:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278973 - stable/8/contrib/bind9/lib/dns X-SVN-Group: stable-8 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: Wed, 18 Feb 2015 22:29:54 -0000 Author: delphij Date: Wed Feb 18 22:29:52 2015 New Revision: 278973 URL: https://svnweb.freebsd.org/changeset/base/278973 Log: Fix CVE-2015-1349. This is a direct commit to stable/8 because BIND is removed from HEAD. Modified: stable/8/contrib/bind9/lib/dns/zone.c Modified: stable/8/contrib/bind9/lib/dns/zone.c ============================================================================== --- stable/8/contrib/bind9/lib/dns/zone.c Wed Feb 18 22:20:19 2015 (r278972) +++ stable/8/contrib/bind9/lib/dns/zone.c Wed Feb 18 22:29:52 2015 (r278973) @@ -7931,6 +7931,12 @@ keyfetch_done(isc_task_t *task, isc_even namebuf, tag); trustkey = ISC_TRUE; } + } else { + /* + * No previously known key, and the key is not + * secure, so skip it. + */ + continue; } /* Delete old version */ @@ -7979,7 +7985,7 @@ keyfetch_done(isc_task_t *task, isc_even trust_key(zone, keyname, &dnskey, mctx); } - if (!deletekey) + if (secure && !deletekey) set_refreshkeytimer(zone, &keydata, now); }