BLS Signature "Malleability"
cve-program · CVE-2021-21405
PublishedLotus is an Implementation of the Filecoin protocol written in Go. BLS signature validation in lotus uses blst library method VerifyCompressed. This method accepts signatures in 2 forms: "serialized", and "compressed", meaning that BLS signatures can be provided as either of 2 unique byte arrays. Lotus block validation functions perform a uniqueness check on provided blocks. Two blocks are considered distinct if the CIDs of their blockheader do not match. The CID method for blockheader includes the BlockSig of the block. The result of these issues is that it would be possible to punish miners for valid blocks, as there are two different valid block CIDs available for each block, even though this must be unique. By switching from the go based `blst` bindings over to the bindings in `filecoin-ffi`, the code paths now ensure that all signatures are compressed by size and the way they are deserialized. This happened in https://github.com/filecoin-project/lotus/pull/5393.
Read the publisher's advisoryeuvd · EUVD-2021-0938
PublishedLotus is an Implementation of the Filecoin protocol written in Go. BLS signature validation in lotus uses blst library method VerifyCompressed. This method accepts signatures in 2 forms: "serialized", and "compressed", meaning that BLS signatures can be provided as either of 2 unique byte arrays. Lotus block validation functions perform a uniqueness check on provided blocks. Two blocks are considered distinct if the CIDs of their blockheader do not match. The CID method for blockheader includes the BlockSig of the block. The result of these issues is that it would be possible to punish miners for valid blocks, as there are two different valid block CIDs available for each block, even though this must be unique. By switching from the go based `blst` bindings over to the bindings in `filecoin-ffi`, the code paths now ensure that all signatures are compressed by size and the way they are deserialized. This happened in https://github.com/filecoin-project/lotus/pull/5393.
Read the publisher's advisorynvd · CVE-2021-21405
PublishedLotus is an Implementation of the Filecoin protocol written in Go. BLS signature validation in lotus uses blst library method VerifyCompressed. This method accepts signatures in 2 forms: "serialized", and "compressed", meaning that BLS signatures can be provided as either of 2 unique byte arrays. Lotus block validation functions perform a uniqueness check on provided blocks. Two blocks are considered distinct if the CIDs of their blockheader do not match. The CID method for blockheader includes the BlockSig of the block. The result of these issues is that it would be possible to punish miners for valid blocks, as there are two different valid block CIDs available for each block, even though this must be unique. By switching from the go based `blst` bindings over to the bindings in `filecoin-ffi`, the code paths now ensure that all signatures are compressed by size and the way they are deserialized. This happened in https://github.com/filecoin-project/lotus/pull/5393.
Read the publisher's advisoryosv · GHSA-4g52-pqcj-phvh
Published### Impact 1. BLS signature validation in lotus uses blst library method VerifyCompressed. This method accepts signatures in 2 forms - "serialized", and "compressed", meaning that BLS signatures can be provided as either of 2 unique byte arrays. 2. Lotus block validation functions perform a uniqueness check on provided blocks. Two blocks are considered distinct if the CIDs of their blockheader do not match. The CID method for blockheader includes the BlockSig of the block. The result of these issues is that it would be possible to punish miners for valid blocks, as there are two different valid block CIDs available for each block, even though this must be unique. ### Patches By switching from the go based `blst` bindings over to the bindings in `filecoin-ffi`, the code paths now ensure that all signatures are compressed by size and the way they are deserialized. This happened in https://github.com/filecoin-project/lotus/pull/5393 ### References - Original POC: https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
Read the publisher's advisoryosv · GO-2022-0905
PublishedBLS Signature "Malleability" in github.com/filecoin-project/lotus
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2021-21405 · CVE overview and exploitation status
cve-program · CVE-2021-21405
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
- https://github.com/filecoin-project/lotus/pull/5393
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
euvd · EUVD-2021-0938
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
- https://github.com/filecoin-project/lotus/pull/5393
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
nvd · CVE-2021-21405
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
- https://github.com/filecoin-project/lotus/pull/5393
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
osv · GHSA-4g52-pqcj-phvh
- https://github.com/filecoin-project/lotus/security/advisories/GHSA-4g52-pqcj-phvh
- https://nvd.nist.gov/vuln/detail/CVE-2021-21405
- https://github.com/filecoin-project/lotus/pull/5393
- https://gist.github.com/wadeAlexC/2490d522e81a796af9efcad1686e6754
osv · GO-2022-0905
Related changes
Linked by CVE identifierNo related changes are available here.