Skip to content

bsv-rs 0.8.7

Choose a tag to compare

@Calgooon Calgooon released this 12 Nov 00:54
· 53 commits to main since this release

A security patch on the stable line. To upgrade: cargo update -p bsv-rs (a "0.8" requirement takes it).

Affected by a published advisory: GHSA-67vc-6c8g-7x48 (low, CVSS 3.7), patched in 0.8.11.
Affected by a published advisory: GHSA-cgp9-rj5h-jxw6 (medium, CVSS 5.3), patched in 0.8.11.
Affected by a published advisory: GHSA-gvmh-f5gf-5vjj (high, CVSS 7.5), patched in 0.8.11.
Affected by a published advisory: GHSA-h4m7-c6p8-725m (high, CVSS 7.5), patched in 0.8.10.
Affected by a published advisory: GHSA-qhj8-j8mj-9cgc (low, CVSS 3.7), patched in 0.8.10.
Affected by a published advisory: GHSA-vmgj-w2jr-c52x (medium, CVSS 5.3), patched in 0.8.10.
Affected by a published advisory: GHSA-82g9-h6jw-r99f (high, CVSS 7.5), no patched version on its line yet.
Affected by a published advisory: GHSA-x3m6-jp5x-236c (medium, CVSS 5.3), patched in 0.8.10.
Affected by a published advisory: GHSA-crr5-gh8p-q2h2 (low, CVSS 3.7), patched in 0.8.10.
Affected by a published advisory: GHSA-w6jf-m9c7-6599 (high, CVSS 7.5), patched in 0.8.10.
Affected by a published advisory: GHSA-fr33-7jw7-mwwh (medium, CVSS 5.9), patched in 0.8.10.
Affected by a published advisory: GHSA-4mcm-g5xq-jv3r (low, CVSS 3.7), patched in 0.8.10.
Affected by a published advisory: GHSA-89w7-x33x-6m9c (high, CVSS 7.5), patched in 0.8.10.
Affected by a published advisory: GHSA-mj2m-jxgv-r446 (high, CVSS 7.5), patched in 0.8.9.
Affected by a published advisory: GHSA-gg5p-wgff-v3hr (medium), patched in 0.8.8.

Fixed

  • A Shamir backup set carrying a share at x = 0 recovered that share's key as the holder's — the secret is the polynomial's value at zero, and a share standing there carries it alone, so one supplied share, its integrity tag ground to match the honest set's, chose the recovered key outright at KeyShares::from_backup_format and KeyShares::recover_private_key. The non-canonical zero x = p worked the same way, and a repeated x past the threshold window also passed. Such a set is refused before interpolating now; a set this crate's own writer produced reads as before. Advisory GHSA-cwxv-4866-5gq2, Critical (9.1). #854

No public type or signature changes.

Not changed

  • The writer is unchanged: a set this crate's own writer produced reads as before, so no code change is needed beyond the update.
  • The 0.9.0 prereleases published so far (0.9.0-beta.1 to 0.9.0-beta.7) are affected; the next prerelease carries the fix.

How it was checked

  • The fix's 25-cell test file: 20 refusal cells red on the 0.8.6 release commit and green on the fix; the honest controls and pins green on both.
  • 13 weakened or removed variants of the fix, each caught red by its cell; 2 clean 60 s fuzz runs on the sibling line's target; 10 witnesses — all passing on this release, 3 of 10 on 0.8.6.
  • Every CI gate green on the release branch: fmt, clippy, the doc build and 267 doc tests, the test suites, the wasm32 build, 229 semver checks against the base, the ratchet, and the secrets scan.

Advisories

  • Fixes GHSA-cwxv-4866-5gq2 (critical): bsv-rs: a Shamir backup share at x = 0 was accepted at recovery, so a supplied share could substitute the recovered private key. Its other affected range(s): >= 0.9.0-beta.1, <= 0.9.0-beta.7 (patched in 0.9.0-beta.8).
  • Affected by GHSA-67vc-6c8g-7x48 (low, CVSS 3.7): bsv-rs: sighash::parse_transaction read a transaction from the front of a longer buffer and dropped the rest. Patched in 0.8.11.
  • Affected by GHSA-cgp9-rj5h-jxw6 (medium, CVSS 5.3): bsv-rs: HttpRequest::from_payload and HttpResponse::from_payload read a message from the front of a longer payload and dropped the trailing bytes. Patched in 0.8.11.
  • Affected by GHSA-gvmh-f5gf-5vjj (high, CVSS 7.5): bsv-rs: Beef::add_input_proof holds a full copy of a shared parent per spending input, so an untrusted overlay answer within the lookup resolver’s size bound can force multi-gigabyte heap (memory-exhaustion denial of service). Patched in 0.8.11.
  • Affected by GHSA-h4m7-c6p8-725m (high, CVSS 7.5): bsv-rs: the default script mode judges a coin created before Genesis by the post-Genesis rules alone, so a spend those rules accept and the coin's own era refuses is verified as valid. Patched in 0.8.10.
  • Affected by GHSA-qhj8-j8mj-9cgc (low, CVSS 3.7): bsv-rs: WhatsOnChainBroadcaster and ArcBroadcaster report the broadcast service's response text as the transaction's txid without checking it against the submitted transaction's own id. Patched in 0.8.10.
  • Affected by GHSA-vmgj-w2jr-c52x (medium, CVSS 5.3): bsv-rs: the P2PKH/P2PK/P2SH/multisig template classifiers accept non-minimal push encodings, so a non-standard locking script is reported as a standard template paying a given address/key. Patched in 0.8.10.
  • Affected by GHSA-82g9-h6jw-r99f (high, CVSS 7.5): bsv-rs: Transaction::from_ef and from_hex_ef build each input's source outputs by the spent output's index with no bound over the transaction, so a small Extended Format transaction forces an outsized allocation. No patched version on its line yet.
  • Affected by GHSA-x3m6-jp5x-236c (medium, CVSS 5.3): bsv-rs: decode_bip276 and the identity key abbreviation panic on a string with a multi-byte character at a cut, an abort on wasm32. Patched in 0.8.10.
  • Affected by GHSA-crr5-gh8p-q2h2 (low, CVSS 3.7): bsv-rs: LivePolicy::refresh panics on a fee-policy response whose miningFee.bytes is 0, and the kilobyte fee model overflows on an out-of-range rate, an abort on wasm32. Patched in 0.8.10.
  • Affected by GHSA-w6jf-m9c7-6599 (high, CVSS 7.5): bsv-rs: RegistryClient's resolve functions return an unsigned definition as its named registry operator's. Patched in 0.8.10.
  • Affected by GHSA-fr33-7jw7-mwwh (medium, CVSS 5.9): bsv-rs: the default script mode does not run a pre-Genesis P2SH coin's redeem script, so a spend the node refuses is verified as valid. Patched in 0.8.10.
  • Affected by GHSA-4mcm-g5xq-jv3r (low, CVSS 3.7): bsv-rs: a GlobalKVStore token signed with the constant key ID kvstore-token passed this crate's signature checks, and on the stable line every door that judges a token, though its signature does not bind the key. Patched in 0.8.10.
  • Affected by GHSA-89w7-x33x-6m9c (high, CVSS 7.5): bsv-rs: KVStoreInterpreter::interpret and interpret_script return an entry for a KVStore token whose signature is not checked, so a peer's unsigned token reads as a controller's value. Patched in 0.8.10.
  • Affected by GHSA-mj2m-jxgv-r446 (high, CVSS 7.5): bsv-rs: KVStoreInterpreter::verify_signature_legacy answers true for every token and key, so a token no controller signed passes it. Patched in 0.8.9.
  • Affected by GHSA-gg5p-wgff-v3hr (medium): bsv-rs: Transaction::to_beef and to_beef_v1 write a BEEF that ends with a proven ancestor or its descendant, not the subject, when the subject's closure rests on a missing input. Patched in 0.8.8.

Changelog · crates.io · docs.rs