Files
purple-electrumwallet/electrum
SomberNight 3d39074294 verifier.py: fix CVE-2012-2459: reject left-sibling duplicates
Due to how the txid-commitment merkle tree used in the block headers is constructed, we need an extra check to be able to validate the *position* of a txid in a block.

I think this is low severity for us.

See https://bitcointalk.org/?topic=102395 :

> The Merkle hash implementation that Bitcoin uses to calculate the Merkle
> root in a block header is flawed in that one can easily construct multiple
> lists of hashes that map to the same Merkle root.
> For example, merkle_hash([a, b, c]) and merkle_hash([a, b, c, c]) yield
> the same result. This is because, at every iteration, the Merkle hash
> function pads its intermediate list of hashes with the last hash if the
> list is of odd length, in order to make it of even length.
>
> And so, the Merkle root function can be effectively preimaged by
> changing the input so that one of the intermediate lists is of even
> length with the last two elements equal (where originally it was
> of odd length with a last element equal to the earlier mentioned two).
> As was later noted, this extends to any input length that is
> not a power of two:
> merkle_hash([a, b, c, d, e, f]) == merkle_hash([a, b, c, d, e, f, e, f]).
> Note that to maintain the same root hash, the only flexibility that
> exists is duplication of elements.

Ported from https://github.com/Electron-Cash/Electron-Cash/commit/165146362b4cb0ad74770b36aca1f9acb2800195

Co-authored-by: bitcoincashautist <80100588+A60AB5450353F40E@users.noreply.github.com>
2026-04-03 02:22:01 +00:00
..
2026-02-21 03:51:52 +00:00
2026-02-17 18:11:13 +00:00
2026-03-20 17:43:12 +00:00
2026-03-20 18:12:55 +00:00
2025-12-02 10:38:10 +01:00
2026-01-28 17:49:36 +01:00
2026-04-02 14:46:50 +02:00
2026-03-20 18:12:55 +00:00
2026-03-20 18:14:38 +00:00
2026-03-27 13:15:07 +00:00
2026-04-02 14:46:50 +02:00
2026-03-20 18:14:38 +00:00