Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 23 Apr 2015 16:26:16 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: setenv if value=NULL, what say standard? Bug?

* Jean-Marc Pigeon <jmp@...e.ca> [2015-04-23 09:58:28 -0400]:
> On 04/23/2015 09:22 AM, Szabolcs Nagy wrote:
> > 
> > you are wrong, glibc actually corrupted then environ on NULL 
> > argument and this was fixed recently
> > 
> > http://sourceware.org/git/?p=glibc.git;a=commit;h=03c1e456b079929a8290aeb4aadb05c0df73bfd2
> >
> >  stop mixing runtime failure with ub, that leads to nonsense 
> > discussions.
> > 
> glibc-2.12-1.132.el6_5.2.x86_64
> I do not confirm env corruption, try:
> 

==6225== Invalid read of size 1
==6225==    at 0x4C2BFC2: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6225==    by 0x4EA1F6B: puts (ioputs.c:37)
==6225==    by 0x40059D: main (in /data/tmp/env/a.out)

> 
> What I am trying to explain, you have something not
> defined in spec, was resolved in a way (you may not like, I agree)
> for EONs.
> 

never worked

bsd always crashed

glibc used to generate invalid memory access which can lead to
arbitrarily bad behaviour, now it's fixed to crash

musl always crashed

> Now "you" decide, to resolve UB another way, you may
> have tons of applications in jeopardy.
> 

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.