Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 1 Jan 2019 11:45:39 -0500
From: Jeffrey Walton <>
To: Torbjörn Granlund <>
Cc: Niels Möller <>,,
Subject: Re: Asserts considered harmful (or GMP spills its sensitive information)

On Tue, Jan 1, 2019 at 11:19 AM Torbjörn Granlund <> wrote:
>   The assert that Jeffrey has hit is in sec_powm.c,
>     ASSERT_ALWAYS (enb >= windowsize);
>   As far as I can see, "enb" is the input argument to the win_size function,
>   and "windowsize" is the return value. I'm waiting for more information,
>   since it works fine in my build. Possible explanations I see are
> A reasonable assumption is that this user has modified the sources to
> cause this bug.  The motive would be to support his auxesis about how
> insecure GMP is.

My bad, I did not mean to imply this was a problem with GMP only. GMP
has a lot of company, like GnuPG and OpenSSL.

I believe the assumption  is incorrect. The sources were not modified,
and a standard (?) 'configure; make; make check' was used. The
reproducer script is available at; see

For completeness here's a quick audit of some security libraries.
Botan, Crypto++ and OpenSSL use -DNDEBUG to remove asserts from
production/release builds. They use asserts as a debugging/diagnostic
aide. They don't depend on crashing the program and risk egressing
sensitive information outside the app's security boundary.

gmp-6.1.2$ grep -iIR assert | wc -l

openssl-1.0.2$ grep -iIR assert | wc -l

libgcrypt-1.8.4$ grep -iIR assert | wc -l

gnupg-2.2.12$ grep -iIR assert | wc -l

cryptopp-8.0$ grep -iIR assert | wc -l

botan-2.8$ grep -iIR assert | wc -l

Cheers, Jeff

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

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