NetBSD Problem Report #32092

From dholland@rhett.eecs.harvard.edu  Thu Nov 17 00:03:06 2005
Return-Path: <dholland@rhett.eecs.harvard.edu>
Received: from rhett.eecs.harvard.edu (rhett.eecs.harvard.edu [140.247.62.156])
	by narn.netbsd.org (Postfix) with ESMTP id 9D3C663B8CA
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Nov 2005 00:03:05 +0000 (UTC)
Message-Id: <200511170001.jAH019NM011094@rhett.eecs.harvard.edu>
Date: Wed, 16 Nov 2005 19:01:09 -0500 (EST)
From: dholland@eecs.harvard.edu
Reply-To: dholland@eecs.harvard.edu
To: gnats-bugs@netbsd.org
Subject: audit-packages version skew breaks badly
X-Send-Pr-Version: 3.95

>Number:         32092
>Category:       pkg
>Synopsis:       audit-packages version skew wedges package system
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    erh
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 17 00:04:00 +0000 2005
>Closed-Date:    Sun Nov 20 08:19:03 +0000 2005
>Last-Modified:  Mon Nov 21 18:02:01 +0000 2005
>Originator:     David A. Holland <dholland@eecs.harvard.edu>
>Release:        NetBSD 2.0 (pkgsrc of 20051116)
>Organization:
    Harvard EECS	
>Environment:
System: NetBSD rhett 2.0 NetBSD 2.0 (GENERIC) #0: Wed Dec 1 10:58:25 UTC 2004 builds@build:/big/builds/ab/netbsd-2-0-RELEASE/i386/200411300000Z-obj/big/builds/ab/netbsd-2-0-RELEASE/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	If audit-packages is out of date, the ALLOW_VULNERABILITIES.*
	logic breaks.

	In particular, I had last updated anything on this machine
	sometime in August, and after cvs updating pkgsrc tonight I
	got bitten by this.

	It wedged the package system: before I could install anything
	else, I had to update pkg_install, but I couldn't update
	pkg_install either because the build system thought that some
	unrelated vulnerabilities in other packages pertained to it.

	Somewhat relatedly, audit-packages seems to depend on itself:
	as part of an unwise workaround attempt I pkg_delete'd it, and
	now that I have pkg_install updated I get this:

rhett# cd security/audit-packages
rhett# make update
===> Checking for vulnerabilities in audit-packages-1.40
===> *** The audit-packages package must be at least version 0.40
===> *** Please install pkgsrc/security/audit-packages package and run
===> *** '/usr/pkg/sbin/download-vulnerability-list'.
*** Error code 1

	Additionally, after this message one gets

or if this package is absolutely essential, add this to mk.conf:
 ALLOW_VULNERABILITIES.audit-packages+====>
 ALLOW_VULNERABILITIES.audit-packages+=CVS
 ALLOW_VULNERABILITIES.audit-packages+=DESCR
 ALLOW_VULNERABILITIES.audit-packages+=MESSAGE
 ALLOW_VULNERABILITIES.audit-packages+=Makefile
 ALLOW_VULNERABILITIES.audit-packages+=PLIST
 ALLOW_VULNERABILITIES.audit-packages+=README.html
 ALLOW_VULNERABILITIES.audit-packages+=files
 ALLOW_VULNERABILITIES.audit-packages+=work
 ALLOW_VULNERABILITIES.audit-packages+=The
 ALLOW_VULNERABILITIES.audit-packages+=audit-packages
 ALLOW_VULNERABILITIES.audit-packages+=package
 ALLOW_VULNERABILITIES.audit-packages+=must
	:

	that is, the error message is being mishandled. And in the
	process it seems to have been globbed by the shell, which is
	itself probably a bad sign.

>How-To-Repeat:

	Get a suitably old version of audit-packages (my guess is that
	reverting version 1.24 of security/audit-packages/files/audit-packages
	will do the trick), install some package with a known vulnerability,
	and try to build pkg_install. It might also be necessary to revert
	pkg_install. (The previous version I had was, I believe, 20050718.)

	I haven't actually tested this.

	(To repeat the audit-packages problem, it should be sufficient
	to pkg_delete it and attempt to reinstall it using today's
	pkgsrc.)

>Fix:
	Most importantly, the proper workaround for the problem
	is to delete everything but the header from the package
	vulnerabilities file, update pkg_install and audit-packages,
	then rerun download-vulnerability-list. I haven't actually
	tried this but it should do the trick.

	Deleting audit-packages to try to disable or fake out the
	check was clearly the wrong idea. :-/

	The proper fix:

	1. pkg_install and audit-packages should always skip the
	   vulnerability check.

	2. Setting ALLOW_VULNERABLE_PACKAGES=1 should still skip the
	   vulnerability check. Right now, it doesn't.

	   While it might be possible to work around the problem using
	   the new ALLOW_VULNERABILITIES logic, that's far from clear
	   and it's not at all obvious at this stage what the right
	   incantation would be. What the system suggests has the same
	   form as the paste above.

	   (Also, ALLOW_VULNERABLE_PACKAGES will still be useful for
	   once-off builds.)

	3. The check that the version of audit-packages is >= 0.40
	   was presumably meant to be 1.40. Either that or it needs to
	   be updated.

	4. ...and obviously the problem with the adding-to-mk.conf
	   message ought to be straightened out, too.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->erh
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 17 Nov 2005 06:55:54 +0000
Responsible-Changed-Why:
erh made the corresponding changes.


From: Eric Haszlakiewicz <erh@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/32092 CVS commit: pkgsrc/pkgtools/pkg_install
Date: Thu, 17 Nov 2005 17:05:30 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	erh
 Date:		Thu Nov 17 17:05:30 UTC 2005

 Modified Files:
 	pkgsrc/pkgtools/pkg_install: Makefile

 Log Message:
 Fix for part of PR#32092: add SKIP_AUDIT_PACKAGES=yes so pkg_install can
 be updated even if audit-packages is out of date.  The audit-packages package
 already has this.


 To generate a diff of this commit:
 cvs rdiff -r1.120 -r1.121 pkgsrc/pkgtools/pkg_install/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Eric Haszlakiewicz <erh@netbsd.org>
To: wiz@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org, dholland@eecs.harvard.edu
Subject: Re: pkg/32092
Date: Thu, 17 Nov 2005 10:44:30 -0600

 On Thu, Nov 17, 2005 at 06:55:55AM +0000, wiz@netbsd.org wrote:
 > Synopsis: audit-packages version skew wedges package system
 > 
 > Responsible-Changed-From-To: pkg-manager->erh
 > Responsible-Changed-By: wiz@netbsd.org
 > Responsible-Changed-When: Thu, 17 Nov 2005 06:55:54 +0000
 > Responsible-Changed-Why:
 > erh made the corresponding changes.
 > 
 > 
 	There's a "SKIP_AUDIT_PACKAGES=yes" line in audit-packages/Makefile
 which is supposed to skip the audit-packages check.  Do you have the latest
 version of that? (1.62)  I'll add that to pkg_install/Makefile too, which
 at least on my machine works as expected.  Then again, there's something
 screwey going on with my shell I think.

 eric

From: dholland@eecs.harvard.edu (David Holland)
To: erh@netbsd.org (Eric Haszlakiewicz)
Cc: wiz@netbsd.org, pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org,
	gnats-admin@netbsd.org, dholland@eecs.harvard.edu
Subject: Re: pkg/32092
Date: Thu, 17 Nov 2005 12:27:42 -0500 (EST)

  > 	There's a "SKIP_AUDIT_PACKAGES=yes" line in audit-packages/Makefile
  > which is supposed to skip the audit-packages check.  Do you have the latest
  > version of that? (1.62)  I'll add that to pkg_install/Makefile too, which
  > at least on my machine works as expected.  Then again, there's something
  > screwey going on with my shell I think.

 Yeah, it's there. Apparently, it doesn't work. Interesting...

 aha. Someone already committed the fix. :-)  It's version 1.93 of
 mk/defaults/mk.conf, dated last night.

 -- 
    - David A. Holland / dholland@eecs.harvard.edu

From: Eric Haszlakiewicz <erh@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/32092
Date: Thu, 17 Nov 2005 13:23:43 -0600

 On Thu, Nov 17, 2005 at 06:28:01PM +0000, David Holland wrote:
 >   > 	There's a "SKIP_AUDIT_PACKAGES=yes" line in audit-packages/Makefile
 >   > which is supposed to skip the audit-packages check.  Do you have the latest
 >   > version of that? (1.62)  I'll add that to pkg_install/Makefile too, which
 >   > at least on my machine works as expected.  Then again, there's something
 >   > screwey going on with my shell I think.
 >  
 >  Yeah, it's there. Apparently, it doesn't work. Interesting...
 >  
 >  aha. Someone already committed the fix. :-)  It's version 1.93 of
 >  mk/defaults/mk.conf, dated last night.

 	oh, duh.  But, wtf?  I _know_ I tested that and it worked, but
 now when I rollback that change it fails as it should.  I think I must
 be losing my mind...  Oh well.   Thanks for fixing it, Roland!

 eric

State-Changed-From-To: open->feedback
State-Changed-By: erh@netbsd.org
State-Changed-When: Fri, 18 Nov 2005 00:07:13 +0000
State-Changed-Why:
I think I've got it all work now (finally).
Make sure you've got all of mk/bsd.pkg.mk, mk/defaults/mk.conf, 
security/audit-packages/Makefile and pkgtools/pkg_install/Makefile up to date.


State-Changed-From-To: feedback->closed
State-Changed-By: erh@netbsd.org
State-Changed-When: Sun, 20 Nov 2005 08:19:03 +0000
State-Changed-Why:
Fixed.


From: dholland@eecs.harvard.edu (David Holland)
To: erh@netbsd.org
Cc: pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org,
	dholland@eecs.harvard.edu
Subject: Re: pkg/32092
Date: Mon, 21 Nov 2005 12:09:32 -0500 (EST)

  > Synopsis: audit-packages version skew wedges package system
  > 
  > State-Changed-From-To: feedback->closed
  > State-Changed-By: erh@netbsd.org
  > State-Changed-When: Sun, 20 Nov 2005 08:19:03 +0000
  > State-Changed-Why:
  > Fixed.

 Confirmed. Sorry I didn't get to this on Friday. :-|

 -- 
    - David A. Holland / dholland@eecs.harvard.edu

>Unformatted:
 #2) Setting SKIP_AUDIT_PACKAGES=yes should work in the place of
 ALLOW_VULNERALE_PACKAGES=1

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.