From owner-freebsd-ports Tue Feb 12 17:50: 7 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E9AF837B402 for ; Tue, 12 Feb 2002 17:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1D1o1E74199; Tue, 12 Feb 2002 17:50:01 -0800 (PST) (envelope-from gnats) Received: from kai.velvet.net (kai.velvet.net [62.49.231.20]) by hub.freebsd.org (Postfix) with ESMTP id 9E35637B402 for ; Tue, 12 Feb 2002 17:44:07 -0800 (PST) Received: (from aidan@localhost) by kai.velvet.net (8.11.6/8.11.6) id g1D1hxD76313; Wed, 13 Feb 2002 01:43:59 GMT (envelope-from aidan) Message-Id: <200202130143.g1D1hxD76313@kai.velvet.net> Date: Wed, 13 Feb 2002 01:43:59 GMT From: Aidan Skinner Reply-To: Aidan Skinner To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/34893: RUS-CERT Advisory 2002-02:01: Temporary file handling in GNAT Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 34893 >Category: ports >Synopsis: RUS-CERT Advisory 2002-02:01: Temporary file handling in GNAT >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Feb 12 17:50:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Aidan Skinner >Release: FreeBSD 4.5-STABLE i386 >Organization: Velvet Networks >Environment: System: FreeBSD kai.velvet.net 4.5-STABLE FreeBSD 4.5-STABLE #1: Fri Feb 9 02:28:32 GMT 2001 root@xev.velvet.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: Gnat uses mktemp to generate temporary files instead of mkstemp, leading to a race condition in generated programs that use temporary files See http://www.securityfocus.com/archive/1/255734 >How-To-Repeat: $ echo "Procedure Foo is begin null; end Foo;" > foo.adb $ /usr/local/bin/gnatmake foo.adb adagcc -c foo.adb gnatbind -x foo.ali gnatlink foo.ali /usr/local/lib/gcc-lib/i386-unknown-freebsd4.5/2.8.1/adalib//libgnat.so: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/local/lib/gcc-lib/i386-unknown-freebsd4.5/2.8.1/adalib//libgnat.so: warning: mktemp() possibly used unsafely; consider using mkstemp() >Fix: Apply the patch at http://cert.uni-stuttgart.de/files/fw/gnat-3.14p-mkstemp.diff in ${PORTSDIR}/lang/gnat/work/gcc-2.8.1/src >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message