Commit graph

3 commits

Author SHA1 Message Date
Oliver Gugger
c5f199e40f
psbt: remove UTXO sanity check to allow fix for CVE
As described in CVE-2020-14199 it is unsafe to only rely on witness
UTXO information when signing. Hardware wallets fixed this by also
requiring the full non-witness UTXO to be present for a witness input.
To be compatible with those newer hardware wallet firmware, we need to
remove the sanity checks that disallowed setting witness and non-witness
UTXOs at the same time.
See https://github.com/bitcoin/bitcoin/pull/19215 for comparison which
removed the sanity checks in Bitcoin Core.
2020-07-20 15:02:02 +02:00
nsa
f06d6af2f0 psbt: return ErrInvalidKeydata if value isn't a 32-bit uint
This commit fixes a panic when deserializing PSBTs in raw binary.
If the key type was SighashType and the value was not 4 bytes long,
the call to binary.LittleEndian.Uint32(value) would panic as the
function expects 4 bytes to parse into a uint32. We now perform a
sanity check that asserts that the value is 4 bytes long.
2020-04-08 17:54:59 -04:00
Olaoluwa Osuntokun
9411189e0e
psbt: move input into new file 2020-01-15 17:56:26 -08:00