Update dependency ecdsa to v0.13.3 [SECURITY] #140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==0.13.2
->==0.13.3
GitHub Vulnerability Alerts
CVE-2019-14853
possible DoS in signature verification and signature malleability
Impact
Code using
VerifyingKey.verify()
andVerifyingKey.verify_digest()
may receive exceptions other than the documentedBadSignatureError
when signatures are malformed. If those other exceptions are not caught, they may lead to program termination and thus Denial of ServiceCode using
VerifyingKey.verify()
andVerifyingKey.verify_digest()
withsigdecode
option usingecdsa.util.sigdecode_der
will accept signatures even if they are not properly formatted DER. This makes the signatures malleable. It impacts only applications that later sign the signatures or verify signatures of signatures, e.g. Bitcoin.All versions between 0.5 and 0.13.2 (inclusive) are thought to be vulnerable. Code before 0.5 may be vulnerable but didn't receive extended analysis to rule this issue out.
Patches
The patches have been merged to
master
branch in tlsfuzzer/python-ecdsa#115.The backported patches for a release in the 0.13 branch are in tlsfuzzer/python-ecdsa#124
They are part of the 0.13.3 release.
There are no plans to backport them to earlier releases.
Workarounds
It may be possible to prevent the Denial of Service by catching also
UnexpectedDER
,IndexError
andAssertionError
exceptions. That list hasn't been verified to be complete though. If those exceptions are raised, the signature verification process should consider the signature to be invalid.To remediate signature malleability and the Denial of Service vulnerability, it may be possible to first verify that the signature is properly DER formatted ECDSA-Sig-Value, as defined in RFC3279, before passing it to
verify()
orverify_digest()
methods. If the signature is determined to not follow the DER or encode a different structure, the signature verification process should consider the signature to be invalid.References
https://en.bitcoinwiki.org/wiki/Transaction_Malleability
For more information
If you have any questions or comments about this advisory please open an issue in python-ecdsa project.
Renovate configuration
📅 Schedule: "" (UTC).
🚦 Automerge: Enabled.
♻️ Rebasing: Whenever PR is stale, or if you modify the PR title to begin with "
rebase!
".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.