randombit / botan

Cryptography Toolkit
https://botan.randombit.net
BSD 2-Clause "Simplified" License
2.59k stars 569 forks source link

Heap Corruption at Destructor Kyber_PrivateKey (Botan 3.6.1) #4428

Closed kre-medisoftware closed 2 weeks ago

kre-medisoftware commented 2 weeks ago

I get a Heap Corruption at the Destructor of Kyber_PrivateKey.


Botan::AutoSeeded_RNG random;
Botan::Kyber_PrivateKey* m_kyberPrivateKey = new Botan::Kyber_PrivateKey(random, Botan::KyberMode::Kyber768_R3);
delete (m_kyberPrivateKey);

grafik

the build-paramaters of Botan 3.6.1 are (amalgamation-mode) python3 configure.py --cc=msvc --os=windows --prefix=%cd% --cpu=x86 --msvc-runtime=MT --amalgamation --disable-shared-library

Is this a known problem?

randombit commented 2 weeks ago

Certainly not a known issue

After building did you run the test suite?

kre-medisoftware commented 2 weeks ago

no i did not. how can i easily build the test suite. i'm use the amalgamation-mode.

randombit commented 2 weeks ago

Amalgamation should not matter one way or another.

From the working directory where you built the library

nmake tests

then

./botan-test

kre-medisoftware commented 2 weeks ago

i am sorry. Building the tests, first had some build errors. So i had to rebuild botal_all.cpp. Finally the tests runs without any errors. With this amalgamation-Build my own application even has no more exceptions.

The issue can be closed. thanks a lot