LibreSSL regression: explicit_bzero failing

2014-08-06 Thread Benny Baumann
Dear OpenBSD folks, I've been following the development of LibReSSL and when testing LibReSSL (the portable releases) on my Linux box (Lubuntu 14.04, Linux Kernel 3.16, GCC 4.9) I noticed the following (kinda) odd behaviour: I'm compiling LibReSSL with the following command lines: automake CFLAGS

Re: LibreSSL regression: explicit_bzero failing

2014-08-06 Thread Brent Cook
On Aug 6, 2014, at 2:57 AM, Benny Baumann wrote: > Dear OpenBSD folks, > > I've been following the development of LibReSSL and when testing > LibReSSL (the portable releases) on my Linux box (Lubuntu 14.04, Linux > Kernel 3.16, GCC 4.9) I noticed the following (kinda) odd behaviour: > > I'm com

Re: LibreSSL regression: explicit_bzero failing

2014-08-06 Thread Matthew Dempsky
On Wed, Aug 6, 2014 at 6:00 AM, Brent Cook wrote: > Matthew, does a change like below preserve the original intent of the > test? No, this change causes undefined behavior using a pointer to an object past when its lifetime ended, which is specifically what explicit_bzero.c is written to avoid by

Re: LibreSSL regression: explicit_bzero failing

2014-08-09 Thread Brent Cook
On Wed, Aug 6, 2014 at 10:37 AM, Matthew Dempsky wrote: > On Wed, Aug 6, 2014 at 6:00 AM, Brent Cook wrote: > > Matthew, does a change like below preserve the original intent of the > > test? > > No, this change causes undefined behavior using a pointer to an object > past when its lifetime ende

Re: LibreSSL regression: explicit_bzero failing

2014-08-09 Thread Matthew Dempsky
On Sat, Aug 9, 2014 at 4:12 PM, Brent Cook wrote: > Which object is used past its lifetime? buf is local to the function, and > secret is a static global. That's exactly the issue: buf is local. Conceptually, to make sure explicit_bzero() is working, we want to write a test like this: int *