From owner-freebsd-bugs@FreeBSD.ORG Thu May 8 19:10:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 831A1106567F for ; Thu, 8 May 2008 19:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5FD8F8FC14 for ; Thu, 8 May 2008 19:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m48JA10s053878 for ; Thu, 8 May 2008 19:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m48JA18n053877; Thu, 8 May 2008 19:10:01 GMT (envelope-from gnats) Resent-Date: Thu, 8 May 2008 19:10:01 GMT Resent-Message-Id: <200805081910.m48JA18n053877@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Richard Stockton Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59DAB1065679 for ; Thu, 8 May 2008 19:03:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 48B288FC17 for ; Thu, 8 May 2008 19:03:45 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m48J2m2q070160 for ; Thu, 8 May 2008 19:02:48 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m48J2mNM070159; Thu, 8 May 2008 19:02:48 GMT (envelope-from nobody) Message-Id: <200805081902.m48J2mNM070159@www.freebsd.org> Date: Thu, 8 May 2008 19:02:48 GMT From: Richard Stockton To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/123529: master.passwd info included in postfix transport.db X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 19:10:01 -0000 >Number: 123529 >Category: misc >Synopsis: master.passwd info included in postfix transport.db >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 08 19:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Richard Stockton >Release: 6.x (actually happens on all 6.x versions) >Organization: Adhost Internet >Environment: FreeBSD mail-in03.adhost.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Tue May 22 13:48:59 PDT 2007 stockton@mail-in03.adhost.com:/usr/src/sys/i386/compile/MAIL-IN03 i386 >Description: These machines are incoming mail servers all running postfix 2.5.0. When changing the transport table with "postmap" or running "newaliases" the .db file created contains not only the contents of the "transport" (or "aliases") file, but also the contents of the "/etc/master.passwd" file. Obviously a security concern. Wietse Veneme (wietse@porcupine.org) the author of postfix suggests this: > Apparently, some SYSTEM LIBRARY Berkeley DB routine writes > uninitialized memory to file. Postfix does not write Berkeley DB > files directly. > > Have you sent a bug report to the FreeSBD bugs database? > > Solaris had a similar problem years ago with the tar(1) command. > Not nice if you were putting tar files on anonymous FTP servers. >How-To-Repeat: Use postfix's "newalaises" or "postmap" to create .db files. I believe the problem may be that the default "db.h" file shipped with FreeBSD is very old (version 1?) and even if you install BerkeleyDB via ports, ("/usr/ports/databases/db44"), that old db.h remains. I suspect that postfix uses that old db.h file when compiling "postmap" and "newaliases". >Fix: I was able to fix the problem by using "makemap". makemap -N hash /etc/postfix/transport < /etc/postfix/transport makemap -N hash /etc/mail/aliases < /etc/mail/aliases >Release-Note: >Audit-Trail: >Unformatted: