Security/SR-1
Security Review 1 - CVE-2022-21449: Psychic Signatures in Java
- Overview
In this CVE some versions of Java do not do proper validation of ECDSA signatures and the signatures can be trivially faked.
This of course seems alarming since Snowblossom makes extensive use of ECDSA signatures, especially for seed based wallets.
However, in review of the issue it was found that while the flaw does absolutely exist in some versions of Java, no version of Snowblossom uses the Java provided security provider for ECDSA signatures.
In the relevant section of Snowblossom code, we are always explicitly using the Bouncy Castle (BC) cryptographic provider.
Signature sig_engine = Signature.getInstance(algo, Globals.getCryptoProviderName());
- References
https://neilmadden.blog/2022/04/19/psychic-signatures-in-java/
- Test Proceedure
On a system with the problematic java versions the test code was run to reproduce the issue.
Testing blank signature with bouncycastle:
Should report false meaning bad signature did not validate
false
Testing blank signature java provider:
Should report false meaning bad signature did not validate
true