aMule Bug Tracker - aMule
View Issue Details
0001754aMuleMiscpublic2015-07-12 14:562015-11-06 18:21
sirkay2006 
 
highminoralways
newopen 
linux amd_64 bitlinux debian8
SVN 
2.3.2 
Any
0001754: [memcheck] Use of uninitialised value in CryptoPP::RawDES::RawProcessBlock
When running aMule on valgrind, the following use of use of uninitialised value has been reported many many times:

==6205== Use of uninitialised value of size 8
==6205== at 0x623945: CryptoPP::RawDES::RawProcessBlock(unsigned int&, unsigned int&) const (des.cpp:335)
==6205== by 0x623C58: CryptoPP::DES_EDE3::Base::ProcessAndXorBlock(unsigned char const*, unsigned char const*, unsigned char*) const (des.cpp:389)
==6205== by 0x5E55C4: ProcessBlock (cryptlib.h:442)
==6205== by 0x5E55C4: CryptoPP::X917RNG::X917RNG(CryptoPP::BlockTransformation*, unsigned char const*, unsigned char const*) (rng.cpp:73)
==6205== by 0x46B346: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::Reseed(unsigned char const*, unsigned long, unsigned char const*, unsigned char const*) (osrng.h:118)
==6205== by 0x46B4F7: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::Reseed(bool, unsigned char const*, unsigned long) (osrng.h:140)
==6205== by 0x46B58F: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::AutoSeededX917RNG(bool, bool) (in /home/ttt/_bin/bin/amuleGit/bin/amule)
==6205== by 0x4636FB: CClientCreditsList::CreateSignature(CClientCredits*, unsigned char*, unsigned char, unsigned int, unsigned char, void*) (ClientCreditsList.cpp:347)
==6205== by 0x452013: CUpDownClient::SendSignaturePacket() (BaseClient.cpp:2116)
==6205== by 0x452466: CUpDownClient::ProcessPublicKeyPacket(unsigned char const*, unsigned int) (BaseClient.cpp:2152)
==6205== by 0x475205: CClientTCPSocket::ProcessExtPacket(unsigned char const*, unsigned int, unsigned char) (ClientTCPSocket.cpp:1324)
==6205== by 0x479150: CClientTCPSocket::PacketReceived(CPacket*) (ClientTCPSocket.cpp:1987)
==6205== by 0x49D7D7: CEMSocket::OnReceive(int) (EMSocket.cpp:275)
==6205== by 0x47975A: CClientTCPSocket::OnReceive(int) (ClientTCPSocket.cpp:1895)
==6205== by 0x46E3BE: CClientTCPSocketHandler::ClientTCPSocketHandler(wxSocketEvent&) (ClientTCPSocket.cpp:101)
==6205== by 0x655207B: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x6552132: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x65524CA: wxEvtHandler::ProcessEvent(wxEvent&) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x6551FD7: wxEvtHandler::ProcessPendingEvents() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x64C9078: wxAppConsole::ProcessPendingEvents() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x5E12E1D: wxAppBase::ProcessIdle() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x5D7664F: wxapp_idle_callback (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x9241B6C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x9241F47: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x9242271: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x74C2596: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==6205== by 0x5D8CC89: wxEventLoop::Run() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x5E12BBA: wxAppBase::MainLoop() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x64FAA39: wxEntry(int&, wchar_t**) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x42F741: main (amule-gui.cpp:93)
==6205== Uninitialised value was created by a heap allocation
==6205== at 0x4C27B8F: malloc (vg_replace_malloc.c:296)
==6205== by 0x5DEECC: CryptoPP::UnalignedAllocate(unsigned long) (misc.cpp:175)
==6205== by 0x5E548B: allocate (secblock.h:100)
==6205== by 0x5E548B: SecBlock (secblock.h:247)
==6205== by 0x5E548B: CryptoPP::X917RNG::X917RNG(CryptoPP::BlockTransformation*, unsigned char const*, unsigned char const*) (rng.cpp:67)
==6205== by 0x46B346: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::Reseed(unsigned char const*, unsigned long, unsigned char const*, unsigned char const*) (osrng.h:118)
==6205== by 0x46B4F7: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::Reseed(bool, unsigned char const*, unsigned long) (osrng.h:140)
==6205== by 0x46B58F: CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3>::AutoSeededX917RNG(bool, bool) (in /home/ttt/_bin/bin/amuleGit/bin/amule)
==6205== by 0x4636FB: CClientCreditsList::CreateSignature(CClientCredits*, unsigned char*, unsigned char, unsigned int, unsigned char, void*) (ClientCreditsList.cpp:347)
==6205== by 0x452013: CUpDownClient::SendSignaturePacket() (BaseClient.cpp:2116)
==6205== by 0x452466: CUpDownClient::ProcessPublicKeyPacket(unsigned char const*, unsigned int) (BaseClient.cpp:2152)
==6205== by 0x475205: CClientTCPSocket::ProcessExtPacket(unsigned char const*, unsigned int, unsigned char) (ClientTCPSocket.cpp:1324)
==6205== by 0x479150: CClientTCPSocket::PacketReceived(CPacket*) (ClientTCPSocket.cpp:1987)
==6205== by 0x49D7D7: CEMSocket::OnReceive(int) (EMSocket.cpp:275)
==6205== by 0x47975A: CClientTCPSocket::OnReceive(int) (ClientTCPSocket.cpp:1895)
==6205== by 0x46E3BE: CClientTCPSocketHandler::ClientTCPSocketHandler(wxSocketEvent&) (ClientTCPSocket.cpp:101)
==6205== by 0x655207B: wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x6552132: wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x65524CA: wxEvtHandler::ProcessEvent(wxEvent&) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x6551FD7: wxEvtHandler::ProcessPendingEvents() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x64C9078: wxAppConsole::ProcessPendingEvents() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x5E12E1D: wxAppBase::ProcessIdle() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x5D7664F: wxapp_idle_callback (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x9241B6C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x9241F47: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x9242271: g_main_loop_run (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4200.1)
==6205== by 0x74C2596: gtk_main (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.25)
==6205== by 0x5D8CC89: wxEventLoop::Run() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x5E12BBA: wxAppBase::MainLoop() (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_gtk2u_core-2.8.so.0.8.0)
==6205== by 0x64FAA39: wxEntry(int&, wchar_t**) (in /home/ttt/_bin/bin/wxWidgets-2.8.12/lib/libwx_baseu-2.8.so.0.8.0)
==6205== by 0x42F741: main (amule-gui.cpp:93)

This line:
347 CryptoPP::AutoSeededX917RNG<CryptoPP::DES_EDE3> rng;

Maybe the issue here is in CryptoPP library?
No tags attached.
Issue History
2015-07-12 14:56sirkay2006New Issue
2015-10-17 23:17GonoszTopiTarget Version => 2.3.2
2015-11-06 18:21sirkay2006Note Added: 0003669

Notes
(0003669)
sirkay2006   
2015-11-06 18:21   
Problem still occurring with g0023527