X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; q=dns; s=default; b=oajX9Q
	/+ECxUSoHuT2r0C0uWjlHENtJxpoNe5Vq52sG6oRQRb4MJTL7ohm6HcLFSFsUaPY
	Xcizltoy1yrEu5gBGlml/u7xNP/+2Lcc1efYxesdqcOvwgpHDCYtQWSMR9RHkf8p
	17kPDSBESLSxfX4IONWt/x/weMh8HK4UdDjKo=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type; s=default; bh=YyZHi4y6/iBb
	slbfdDIlcKqb1pc=; b=Hgbt2tv6ueKQg7j0tqFEFLrtupXYT4+wuG8wgKwvgRyn
	sQ5BETzLATQX4dE62AcKHxAl3/tIc4REYoOhpcfBwLZfieGmA4i/X4KLQaxQcEGm
	4VitFAgiR4MPtKjQCs6+6L5D50YqLX5EaSPvG2n1r4JNhupYIYii0l8o6LCn5XA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mx1.redhat.com
Message-ID: <54137C7F.1040507@redhat.com>
Date: Fri, 12 Sep 2014 17:06:39 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cannot exec() program outside of /bin if PATH is unset
References: <5413271B.1010109@t-online.de> <54134A83.80107@redhat.com> <54135451.3060902@t-online.de> <601154762.20140913012935@yandex.ru> <541378C4.6030705@t-online.de> <54137BDE.6040907@redhat.com>
In-Reply-To: <54137BDE.6040907@redhat.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jPHAVdLlqGja9BaoQvw6oGexdBIdWCbfh"
X-IsSubscribed: yes

--jPHAVdLlqGja9BaoQvw6oGexdBIdWCbfh
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 09/12/2014 05:03 PM, Eric Blake wrote:
> On 09/12/2014 04:50 PM, Christian Franke wrote:
>> Andrey Repin wrote:
>>>> Hmm... is postfix actually broken?
>>>> Unsetting PATH is IMO sane (from the POSIX POV) if all exec() calls use
>>>> absolute path names.
>>> If all exec() calls are made with full paths, unsetting $PATH does not
>>> improve
>>> security in any way,
>>
>> Of course. But postfix could be configured to run "unknown" external
>> programs through its various daemons. In this case, a fixed (here:
>> empty) PATH improves security. If not convinced, please discuss with the
>> author of postfix :-)
>=20
> An empty PATH leaves it up to the implementation what helpers get run
> (if it doesn't fall over first), which is LESS secure than a guaranteed
> safe PATH of confstr(_CS_PATH).

By the way, passing a _safe_ PATH to your child process IS a good idea
for security-conscious programs, but you have to do it correctly (by
passing an actual safe path, and NOT by completely unsetting PATH).

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--jPHAVdLlqGja9BaoQvw6oGexdBIdWCbfh
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg

iQEcBAEBCAAGBQJUE3x/AAoJEKeha0olJ0NqkpsIAIyAlikVTCfvsO7KugJdmHdb
y6f+HBS9H1rjMhV7hwyunvv4b+n/cZ7xYu3uqz8HXVba9MikrfJ0k8Spa3d9XHbt
JTfb0qBId2V1P006hR3bS95KmhZzYM8/R1+dyXup7I3FtXjXG/3S8Vs1+xa4/AZS
XN0ccfaf+Jcvubzm0YUP7skiHpO2l7pbMWo/SKuqHxtuLSjicA7GNjVW3kDpj2iq
h1aL2E4mx/YoJqLlwqxoqt9zQ6FDIgCMeXTNIrXJ9N8Yxl7vklitG2drJsvyf5ys
okp/HTqKN0pMfCjgsAytJjZzh1hAG2yvaaTSIGRvFe5fD5zmXAWRakjzbIWGS6M=
=t9Kv
-----END PGP SIGNATURE-----

--jPHAVdLlqGja9BaoQvw6oGexdBIdWCbfh--
