From nobody@FreeBSD.org  Mon Oct 15 21:36:41 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 1F854EBE
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Oct 2012 21:36:41 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E01CB8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Oct 2012 21:36:40 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q9FLaeqA045134
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Oct 2012 21:36:40 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id q9FLaeG7045133;
	Mon, 15 Oct 2012 21:36:40 GMT
	(envelope-from nobody)
Message-Id: <201210152136.q9FLaeG7045133@red.freebsd.org>
Date: Mon, 15 Oct 2012 21:36:40 GMT
From: Jason Byrne <slvr32@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: http://www.freebsd.org/security/advisories/FreeBSD-SA-12:05.bind.asc instructions assume existence of previous builds and libraries
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         172736
>Category:       misc
>Synopsis:       http://www.freebsd.org/security/advisories/FreeBSD-SA-12:05.bind.asc instructions assume existence of previous builds and libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 15 21:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jason Byrne
>Release:        8.2-P9
>Organization:
>Environment:
FreeBSD fw31.cis 8.2-RELEASE-p6 FreeBSD 8.2-RELEASE-p9
>Description:
I regularly build new releases, and install fresh boxes at the current patch level, e.g. FreeBSD 8.2-P9.

I've found that the instructions in some advisories seem to assume that the maintainer of a box has used previous advisories to maintain that box from a previous patch level, and the instructions aren't necessarily correct as standalone instructions, especially if you have a box that was freshly installed at a particular patch level.

For example, for the latest BIND advisory... http://www.freebsd.org/security/advisories/FreeBSD-SA-12:05.bind.asc -

If you happened to do a clean install of FreeBSD 8.2-P9, and you don't already have libraries built below /usr/src/lib/bind, then running 

# cd /usr/src/lib/bind/dns
# make obj && make depend && make && make install

and then following up with the next set of instructions

# cd /usr/src/usr.sbin/named
# make obj && make depend && make && make install

you'll get several complaints about missing libraries under /usr/src/lib/bind.

I'd argue that the safer set of instructions, not assuming that related libraries under /usr/src/lib/bind/isc, /usr/src/lib/bind/isccc, /usr/src/lib/bind/isccfg, etc... are built would be the following...

# cd /usr/src/lib/bind
# make obj && make depend && make && make install

and then proceeding with

# cd /usr/src/usr.sbin/named
# make obj && make depend && make && make install

Thanks,
- Jason



>How-To-Repeat:
Do a fresh install of FreeBSD 8.2-P9 (assuming that you maintain a release server, and build releases at the current patch level).

Follow instructions for http://www.freebsd.org/security/advisories/FreeBSD-SA-12:05.bind.asc


>Fix:
Don't assume existence of several libraries under /usr/src/lib/bind from previous BIND advisories.

Run the following as the first 'build' step...

# cd /usr/src/lib/bind
# make obj && make depend && make && make install

rather than

# cd /usr/src/lib/bind/dns
# make obj && make depend && make && make install


>Release-Note:
>Audit-Trail:
>Unformatted:
