Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Aug 2000 03:10:39 -0700 (PDT)
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Kelly Yancey <kbyanc@posi.net>
Cc:        audit@freebsd.org
Subject:   Re: Update to patch(1)
Message-ID:  <Pine.BSF.4.21.0008010305050.86459-100000@freefall.freebsd.org>
In-Reply-To: <Pine.BSF.4.21.0007020752520.6709-100000@gateway.posi.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2 Jul 2000, Kelly Yancey wrote:

> 
>   Can someone please review the patches in PR 19642. They merge in many
> changes to patch(1) from OpenBSD. Specifically, they remove the standard
> mktemp race condition as well as fix some potential buffer overflows.

Sorry for the delay.

Some comments:

* be consistent about sizeof(foo) vs sizeof foo (choose whichever the
surrounding file uses)

* system() is insecure - there's no point in making all the string
operations buffer-safe if you go and pass a user string to system() :-)

* mkstemp() + close() isn't a drop-in replacement for mktemp() since it
will leave tempfiles around if the program exits through an abnormal
channel (error condition, signal, etc). mkstemp() + unlink() is usually
okay if the program (or another program) doesn't need to reopen the same
file, although it needs more source-code modification.

Kris

--
In God we Trust -- all others must submit an X.509 certificate.
    -- Charles Forsythe <forsythe@alum.mit.edu>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0008010305050.86459-100000>