Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Corinna Vinschen
On Feb 19 11:27, Eric Blake wrote: > On 2/19/19 11:21 AM, Corinna Vinschen wrote: > > >> That said, while it is ideal to avoid squashing to NULL in situations > >> that are not security boundaries (as with your STC displaying HOME even > >> after seteuid() on Linux), I'm also okay if we filter too

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Eric Blake
On 2/19/19 11:21 AM, Corinna Vinschen wrote: >> That said, while it is ideal to avoid squashing to NULL in situations >> that are not security boundaries (as with your STC displaying HOME even >> after seteuid() on Linux), I'm also okay if we filter too aggressively >> (the way gnulib's fallback i

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Corinna Vinschen
On Feb 19 11:14, Eric Blake wrote: > On 2/19/19 10:58 AM, Yaakov Selkowitz wrote: > > >>> "Secure execution is required if one of the following conditions was > >>> true when the program run by the calling process was loaded: [...]" > >>> > >>> Do we ever have this situation? We don't have any c

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Eric Blake
On 2/19/19 10:58 AM, Yaakov Selkowitz wrote: >>> "Secure execution is required if one of the following conditions was >>> true when the program run by the calling process was loaded: [...]" >>> >>> Do we ever have this situation? We don't have any capability to make >>> real and effective user I

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Yaakov Selkowitz
On Tue, 2019-02-19 at 12:59 +0100, Corinna Vinschen wrote: > On Feb 19 12:43, Corinna Vinschen wrote: > > On Feb 18 23:09, Yaakov Selkowitz wrote: > > > Signed-off-by: Yaakov Selkowitz > > > --- > > > This is being used more frequently. Since we don't have Linux > > > capabilities, > > > setuid/

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Corinna Vinschen
On Feb 19 12:43, Corinna Vinschen wrote: > On Feb 18 23:09, Yaakov Selkowitz wrote: > > Signed-off-by: Yaakov Selkowitz > > --- > > This is being used more frequently. Since we don't have Linux capabilities, > > setuid/setgid is the only condition we have to check. > > I'm not sure this is right

Re: [PATCH] Cygwin: add secure_getenv

2019-02-19 Thread Corinna Vinschen
On Feb 18 23:09, Yaakov Selkowitz wrote: > Signed-off-by: Yaakov Selkowitz > --- > This is being used more frequently. Since we don't have Linux capabilities, > setuid/setgid is the only condition we have to check. I'm not sure this is right. The Linux man page claims "Secure execution is requ

[PATCH] Cygwin: add secure_getenv

2019-02-18 Thread Yaakov Selkowitz
Signed-off-by: Yaakov Selkowitz --- This is being used more frequently. Since we don't have Linux capabilities, setuid/setgid is the only condition we have to check. newlib/libc/include/stdlib.h | 3 +++ winsup/cygwin/common.din | 1 + winsup/cygwin/environ.cc