ethereum / aleth

Aleth – Ethereum C++ client, tools and libraries
GNU General Public License v3.0
3.96k stars 2.18k forks source link

Race condition in key manager #5892

Open tzubcic-tolar opened 4 years ago

tzubcic-tolar commented 4 years ago

https://github.com/ethereum/aleth/blob/a3b93200d2e88cbf2c1a2c15f0e8973f8454c8bc/libethcore/KeyManager.cpp#L357

There are multiple issues with this method:

Until this is fixed, I suggest using KeyPair::create() directly instead of KeyManager::newKeyPair.

chfast commented 4 years ago

Personally, I would not use the key related code for anything. This is barely maintained for long time. We can integrate a fix if you want to propose one.