[botan-devel] 2.0.1 botan-test segmentation fault on mceliece

Matthew Weaver matthew at xnor.ai
Wed Apr 5 16:34:42 EDT 2017


Thanks for taking a look.
Yes, building with standard GCC -- gcc (Ubuntu 5.4.0 6ubuntu1~16.04.4)
5.4.0 20160609.  The seg fault is consistently reproducible on my machine
with a full build.

Reading symbols from botan-test...(no debugging symbols found)...done.
[New LWP 30276]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./botan-test mceliece'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fcabfae9b7a in Botan::polyn_gf2m::gcd(Botan::polyn_gf2m const&,
Botan::polyn_gf2m const&) () from /usr/local/src/Botan-2.0.1/libbotan-2.so.0
#0  0x00007fcabfae9b7a in Botan::polyn_gf2m::gcd(Botan::polyn_gf2m const&,
Botan::polyn_gf2m const&) () from /usr/local/src/Botan-2.0.1/libbotan-2.so.0
#1  0x00007fcabfaf01d1 in Botan::polyn_gf2m::degppf(Botan::polyn_gf2m
const&, int*) ()  from /usr/local/src/Botan-2.0.1/libbotan-2.so.0
#2  0x00007fcabfaf13e8 in Botan::polyn_gf2m::polyn_gf2m(int,
Botan::RandomNumberGenerator&, std::shared_ptr<Botan::GF2m_Field>) () from
/usr/local/src/Botan-2.0.1/libbotan-2.so.0
#3  0x00007fcabfad9ebd in
Botan::generate_mceliece_key(Botan::RandomNumberGenerator&,
unsigned int, unsigned int, unsigned int) () from
/usr/local/src/Botan-2.0.1/libbotan-2.so.0
#4  0x00007fcabfae35a8 in Botan::McEliece_PrivateKey::Mc
Eliece_PrivateKey(Botan::RandomNumberGenerator&, unsigned long, unsigned
long) () from /usr/local/src/Botan-2.0.1/libbotan-2.so.0
#5  0x000000000049e27b in Botan_Tests::(anonymous
namespace)::McEliece_Tests::run() ()
#6  0x00000000004fc1cf in
Botan_Tests::Test::run_test(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool) ()
#7  0x000000000042cb8d in (anonymous namespace)::Test_Runner::run_t
ests(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, std::ostream&,
unsigned long) [clone .constprop.386] ()
#8  0x000000000042d74f in (anonymous namespace)::Test_Runner::go() ()
#9  0x00000000004345d8 in Botan_CLI::Command::run(std::v
ector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&) ()
#10 0x00000000004217aa in main ()

-M

​Date: Fri, 31 Mar 2017 03:32:10 -0400
From: Jack Lloyd <jack at randombit.net>
To: Botan development list <botan-devel at randombit.net>
Subject: Re: [botan-devel] 2.0.1 botan-test segmentation fault on
        mceliece
Message-ID: <20170331073210.GA21488 at randombit.net>
Content-Type: text/plain; charset=us-ascii

On Thu, Mar 30, 2017 at 04:29:27PM -0700, Matthew Weaver wrote:
> % ./configure.py
> % make
> % ./botan-test mceliece
> Testing Botan 2.0.1 (released, dated 20170109, revision git:
> 55a1d935e736716480407378565939b9e6c829b9, distribution unspecified)
> Starting tests rng:HMAC_DRBG with seed '14B0CB0D4FA6BCFF'
> zsh: segmentation fault (core dumped)  ./botan-test mceliece
>
> % uname -a
> Linux desktop 4.8.0-45-generic #48~16.04.1-Ubuntu SMP Fri Mar 24 12:46:56
> UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Hi Matthew,

Thanks for the report. Unfortunately I cannot replicate this with
either 2.0.1 or latest master (on a non-Ubuntu x86-64 Linux). It also
passes ok on our 14.04 CI systems. Is this crash consistent for you?
Are you using the stock 16.04 GCC?

A simple backtrace, even without debug symbols, might be enough to
deduce the problem.

Jack

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20170405/5e341f9a/attachment.html>


More information about the botan-devel mailing list