Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Jan 2019 20:55:43 +0100
From: "Marco Bodrato" <>
Subject: Re: Asserts considered harmful (or GMP spills its sensitive


Il Lun, 31 Dicembre 2018 7:03 pm, Jeffrey Walton ha scritto:
[...skipping opinions...]

> Here's a small example of triggering an assert using the Nettle
> library.

This absolutely is NOT a "small example", it requires to build two entire
Anyway we analysed it, see below.

> ARM A-32 does not work at the moment due to GMP build errors.

Can we suggest you to read the GMP manual on how to build the library?
GMP works fine on many ARM configurations we test and there are lots of
projects out there (eg. many GNU/Linux distributions) that builds GMP for
different ARM processors.

> In the case below Nettle is using benign data and not maliciously
> crafted data.

I'm sorry, but your analysis was incorrect.

I agree, Nettle is not using "maliciously crafted data", but I do not
agree when you say that it "is using benign data".

With your build options, Nettle calls the GMP function mpn_sec_powm with
an invalid parameter: ebn = 0.

Because of an error in the Nettle library you built, GMP receives "non
benign data". To avoid further memory corruptions, GMP aborts.

Thanks to this behaviour of GMP, you was able to catch the incorrect built
of the library using it. ;-)

Using mpn_sec_powm with an exponent of zero bits is obviously a nonsense,
and in general the documentation of GMP clearly says that arguments of
size zero are not supported.

On GMP side, we can only specify even more explicitly in the documentation
of that function the need for non-zero sized arguments.



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.