Skip to content

bsv-rs 0.8.8

Choose a tag to compare

@Calgooon Calgooon released this 12 Nov 23:33
· 50 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.

Fixed

  • A BEEF written from a transaction's own ancestry ended with a proven ancestor or its descendant, not the transaction, when its closure rested on a missing input — the doors collected the ancestry with the transaction last, then sorted the entries before writing, so a graph holding a proven branch beside a missing source got its transaction written before the proven ancestor, and the read that names no txid (Transaction::from_beef(&bytes, None)) answered the last entry: a real, valid transaction that is not the one the caller serialized, so an application could store, index, notify or pay by a txid that was not the subject's. The two plain doors (to_beef, to_beef_v1) now write the collected order, the transaction last; the atomic door's bytes are unchanged. A read that names the txid was never misled, a graph with no proven entry was never misread, and a BEEF any earlier version wrote still reads. Advisory GHSA-gg5p-wgff-v3hr, Medium (5.3).

No public type or signature changes.

Not changed

  • The Beef-level doors keep their documented dependency sort: a BEEF a caller assembles by hand, and one built by merge_beef, still writes it.
  • 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 16-cell test file: 7 cells red on the 0.8.7 release commit and green on the fix; the boundary cells, the atomic door's among them, green on both; nine plants of the fix, each caught by a cell.
  • The fuzz target's new round-trip check at both doors, with a seed of the shape that crashes a base build carrying it; 2 clean 60 s runs; the honest-graph differential (20,000 trees, one SHA-256 digest) equal on 0.8.7 and the fix, and the atomic door's bytes equal to 0.8.7's on 60,000 generated graphs.
  • 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.
  • The ten witnesses — all passing on this release, 6 of 10 on 0.8.7.

Advisories

  • Fixes 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. 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.

Changelog · crates.io · docs.rs