delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/09/12/19:06:57

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT redhat DOT 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 AT cygwin DOT com
Subject: Re: Cannot exec() program outside of /bin if PATH is unset
References: <5413271B DOT 1010109 AT t-online DOT de> <54134A83 DOT 80107 AT redhat DOT com> <54135451 DOT 3060902 AT t-online DOT de> <601154762 DOT 20140913012935 AT yandex DOT ru> <541378C4 DOT 6030705 AT t-online DOT de> <54137BDE DOT 6040907 AT redhat DOT com>
In-Reply-To: <54137BDE.6040907@redhat.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019