Skip to content

deps(stack): bump bsv-rs from 0.8.11 to 0.8.13 in the bsv-stack group - #54

Merged
github-actions[bot] merged 1 commit into
mainfrom
dependabot/cargo/bsv-stack-3c35dd71cd
Nov 18, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
dependabot/cargo/bsv-stack-3c35dd71cd

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 18, 2026

Copy link
Copy Markdown
Contributor

Bumps the bsv-stack group with 1 update: bsv-rs.

Updates bsv-rs from 0.8.11 to 0.8.13

Release notes

Sourced from bsv-rs's releases.

bsv-rs 0.8.13

A stable patch release that closes a GlobalKVStore selector-filter gap. One advisory of this repository is fixed in 0.8.13.

Upgrade

cargo update -p bsv-rs. An application that reads a GlobalKVStore selector answer (query, get_by_controller, get_by_tags) from an overlay lookup host it does not fully trust gets the selector enforced for it by the default read path; there is no API or type change, so the upgrade is a cargo update.

Advisories

  • GHSA-j4w5-4g84-q3f4 (Medium): GlobalKVStore::query, get_by_controller and get_by_tags sent the caller's selector — a controller, a protocol or tags — to the overlay lookup resolver and returned the resolver's answer without re-checking the selector on the client side. A token's fields are controller-signed, so a lookup host cannot forge a token, but it can answer a selector query with any real, validly-signed token of another controller or of other tags, and the crate returned it. Fixed by dropping a decoded entry that does not satisfy the query's key, controller (case-insensitive), protocol or tags before it is returned.

What changed

  • GlobalKVStore::query_overlay, the one path every read door and the existing-token lookup share, now drops a decoded entry that does not satisfy the query's key, controller (compared case-insensitively), protocol (App-namespace-aware) or tags (all/any mode) before it is returned, through KVStoreInterpreter::entry_matches_query — the reference's #entryMatchesQuery. This is additive-stricter: no public API or type change. An honest caller talking to an honest host sees the same entries, values and errors; only a host-injected non-matching entry is now dropped.
  • A key-only get(key) is unaffected (it carries no controller selector; the reference is equally lenient there).

Where

  • main: #1053, ending at a889e8c9; beta: #1052, ending at d9df6173.
  • The entry, with what was reachable, the fix, the tests and the migration: CHANGELOG.md, this version's section.

bsv-rs 0.8.12

A stable patch release that completes the GHSA-gvmh-f5gf-5vjj fix of 0.8.11. One advisory of this repository is fixed in 0.8.12.

Upgrade

cargo update -p bsv-rs. Before upgrading, read the migration block at the head of this version's section of CHANGELOG.md: it lists what a caller does, in order. A service that reads BEEF bytes from a party it does not trust takes the default link bounds; a service that must link a large ancestry it trusts raises BeefLinkLimits::max_link_heap_bytes or opts out with BeefLinkLimits::unbounded.

Advisories

  • GHSA-33fm-jcm5-4m3m (High): the per-link byte budget shipped for GHSA-gvmh-f5gf-5vjj in 0.8.11 metered a shared parent's serialized wire bytes but not the heap each cloned stub re-materializes — the proof (MerklePath/BUMP) cloned with it and the struct backings of its inputs and outputs. A BEEF sharing one BUMP across many proven parents, and a wide fan-in of tiny-locked outputs, could still force an out-of-memory kill (or on wasm32 an abort) within the overlay resolver's 32 MiB response bound. Fixed by a second, heap budget beside the wire budget (BeefLinkLimits::max_link_heap_bytes, default 56 MiB), refusing a link when either bound is crossed.

What changed

  • The BEEF linker now meters the HEAP each cloned stub re-materializes — the cloned proof and the input/output struct backings — beside the wire budget 0.8.11 added, and refuses a BEEF past BeefLinkLimits before the clone, with Error::BeefResourceLimit. The default-constructed limits gain a 56 MiB heap bound (DEFAULT_MAX_LINK_HEAP_BYTES); BeefLinkLimits::unbounded lifts both bounds. This is a semver-additive change: a new #[non_exhaustive] field and a new constant, nothing removed or changed.
  • The one default reach that moves: the default refuses an honest single-parent plain-payment (P2PKH) sweep above 586 outputs (the published 0.8.11 figure, 702, remains the wire onset); the data-carrying onsets (251 outputs of 256 B, 127 of 1 KiB) are wire-bound and unchanged. A caller that needs the full reach raises max_link_heap_bytes.
  • The link-ancestry bounds moved to src/transaction/beef/link_limits.rs (a pure refactor, no behaviour change) so each file stays under the ratchet's line ceiling.

Where

  • main: #1048, ending at a01c6cb4; beta: #1047, ending at ffedeed1.
  • Every entry, with what was wrong, the reach, the fix, the tests and the migration: CHANGELOG.md, this version's section.
Changelog

Sourced from bsv-rs's changelog.

[0.8.13] - 2026-11-18

Security: GlobalKVStore selector queries enforce the query's controller, protocol and tags against the overlay resolver's answer

  • What was reachable. GlobalKVStore::query, get_by_controller and get_by_tags sent the caller's selector (a controller, a protocol or tags) to the overlay lookup resolver and returned its answer without re-checking the selector on the client side. A token's fields are controller-signed (the token-authentication fixes), so a lookup host cannot forge a token, but it can answer a selector query with any real, validly-signed token of any controller or tags; a caller that trusted get_by_controller(X) to return only X's entries was served another controller's token, honestly self-labelled with its true controller. Reachable from an untrusted lookup host on the default read path (no feature flag). The existing-token lookup that set and remove run reads the same path and did not re-check the controller of each returned entry either, so a host's wrong-controller token could be taken as the caller's existing token; spending such a token still needs the caller's own key, so the caller-facing loss is on the three read doors.
  • What changed. query_overlay (src/kvstore/global.rs), the one path every read door and the existing-token lookup share, now drops a decoded entry that does not satisfy the query's key, controller (case-insensitive), protocol or tags before it is returned, through KVStoreInterpreter::entry_matches_query (src/kvstore/interpreter.rs). No API or type change.
  • Pinned by. tests/kvstore_global_selector_filter.rs: a host-injected other-controller token is dropped by get_by_controller, a token missing a queried tag by get_by_tags (all and any modes), and a token of another protocol by query; an honest matching token is kept, a key-only get is unchanged (equally lenient on both sides), and an existing-token lookup (remove) does not adopt a wrong-controller token. RED on a scratch copy of the tip before the fix. The entry_matches_query unit tests in src/kvstore/interpreter.rs pin each guard directly — the key, the case-insensitive controller, the bare-name and [1, name] App-level protocol match, and the all/any tag mode — because the integration door cannot reach a pub(crate) function and the real path leaves four of the guards unexercised.
  • Migration. None. An honest caller talking to an honest host sees the same entries, values and errors; only a host-injected non-matching entry is now dropped.
  • Notes: cross-SDK parity. This conforms to the reference at the pin (ts-stack@edf6e03 packages/sdk/src/kvstore/GlobalKVStore.ts:601, :663-685), whose #entryMatchesQuery already drops such an entry; this crate was lenient. No row of the divergence list moves.

[0.8.12] - 2026-11-17

Fixed: a second, heap bound on linking, beside the wire bound, closes the heap-held sibling of GHSA-gvmh-f5gf-5vjj (bsv-rs #749 fold-c)

  • What was red. a_many_output_sweep_whose_heap_passes_the_budget_is_refused_under_the_default_749c (tests/beef_link_heap_749c.rs) and the_default_bounds_the_heap_held_linking_a_wide_fan_in_749c (tests/beef_link_heap_budget_749c.rs, a dhat::Alloc heap measure). The #749 bound (and its proof fold) metered the WIRE a shared parent re-materializes — stub.to_binary().len(). But a cloned stub holds far more HEAP than its wire bytes: the struct Vec backings of its inputs and outputs, and the proof's leaf structs (each BUMP leaf keeps its hash as a 64-character hex String). A one-byte-locked output is ~10 wire bytes yet ~150 heap bytes, so a child of a parent of N one-byte outputs spent M ways held ≈M·N·150 of heap while the wire meter saw ≈M·N·10 — the 16 MiB wire default LINKED, or declined only after holding, ~148–248 MB on a ~57 KB answer, past the 128 MB Worker isolate (a wasm32 abort). Reached through the overlay lookup resolver and every door that parses a stranger's BEEF.
  • What changed. src/transaction/beef/link.rs and src/transaction/beef.rs. The one wire meter becomes TWO: max_link_bytes keeps metering WIRE bytes exactly as 0.8.11 did (so a caller's explicit number keeps its meaning and no honest wire onset moves — see below), and a NEW additive BeefLinkLimits::max_link_heap_bytes (default DEFAULT_MAX_LINK_HEAP_BYTES = 56 MiB) meters the HEAP each clone holds: stub_struct_heap (the size_of-sized Vec backings) folded into the per-repeat heap charge, and bump_heap (each leaf's struct plus its 64-byte hex hash) charged at every BUMP clone — the shared BUMP is one copy in the wire but K copies in memory, so it is a heap amplification. Both refuse BEFORE the clone; a link is refused when EITHER bound is crossed. On this 0.8.x line Beef::find_transaction_for_signing clones the found transaction WITHOUT linking its inputs' source transactions (the #603 source linking is the 0.9 line's), so the signing-door sibling is not reachable here and needs no metering — a one-line code comment marks it, where the 0.9 line meters that convenience under the same bounds. The shared BeefLinkBudget pool now bounds the TOTAL heap of concurrent links. Compile-time size_of assertions, recompiled on the wasm32 slice, keep the charge an upper bound on every target. BeefLinkLimits is #[non_exhaustive] (its own doc anticipated "a later bound can be added without a break"), so the new field is additive and semver-patch-safe; BeefLinkLimits::unbounded lifts both bounds.
  • Honest reach. Because max_link_bytes still meters WIRE exactly, the published per-output-size WIRE onsets are unchanged to the output — 702 / 251 / 127 plain-payment / 256 B / 1 KiB outputs at the 16 MiB default, 993 / 354 / 180 at 32 MiB — pinned by the_wire_onsets_are_the_published_0811_figures (which lifts the heap bound to isolate the wire axis). With both default bounds active, the data-carrying onsets (251, 127; 354, 180 at 32 MiB wire) are wire-bound and unchanged, and only the plain-payment onset — the lowest heap density, so the highest wire reach — is capped by the 56 MiB heap bound to 586 outputs (was 702; the memory a 586-output single-parent sweep holds is the 56 MiB envelope). This supersedes the default plain-payment onset the GHSA-gvmh-f5gf-5vjj / [0.8.11] entry states (702): that 702 figure is now the WIRE onset, pinned by the_wire_onsets_are_the_published_0811_figures, while the_default_headroom_is_stated_per_output_size fixes the default at 586 with both bounds active. The largest shared-parent fan any real dependent BEEF carries is 20, far under any onset, so no honest input any dependent builds is newly refused; a caller that set a larger explicit max_link_bytes and wants its full reach raises max_link_heap_bytes in step.
  • Pinned by. tests/beef_link_heap_749c.rs (a 700-way one-byte sweep the 16 MiB wire meter admits is refused by the 56 MiB heap default; the unbounded opt-out links it), tests/beef_link_heap_budget_749c.rs (dhat::Alloc: the default holds a declined-late wide fan-in's peak live heap inside the envelope, where the wire-only meter held ~248 MB), tests/beef_link_bump_749b.rs (the shared BUMP refused by an explicit heap bound), and tests/beef_link_bound.rs (the wire onsets, the default onsets 586 / 251 / 127, and the additive heap field). RED verified on the pre-fold tip with the fold-c removed.
  • Migration. Additive: the new max_link_heap_bytes field defaults to 56 MiB and unbounded lifts it. A BEEF whose shared-parent or shared-proof re-materialization would hold more than 56 MiB of heap, linked by default, is now refused with Error::BeefResourceLimit (the same resource class, never read as an invalid or absent BEEF); a caller that trusts its source opts out with BeefLinkLimits::unbounded, and one that set a larger explicit wire budget raises max_link_heap_bytes to match.

Notes: cross-SDK parity (bsv-rs #749 fold-c)

The references share one proof and one parent object by reference (merklePath?: MerklePath; *MerklePath; one Transaction per txid), so a repeat input or a shared BUMP costs them O(1), not a deep copy — neither carries this amplification, and neither meters a per-clone heap because none is re-materialized. This crate owns both by value, so the linker deep-copies them and the heap bound weighs those copies at the heap they cost, beside the wire bound the published record states. The shared-reference shape (Option<Arc<MerklePath>>, shared source objects) that would remove the amplification by construction is the 0.9 cut's own matter, ordered after #915; this patch bounds the heap additively on both published lines without it.

Fixed: the link bound charges the proof a stub carries, not the transaction bytes alone (bsv-rs #749 fold; the sibling of GHSA-gvmh-f5gf-5vjj)

  • What was red. a_shared_bump_cloned_per_proven_parent_is_refused_by_the_byte_bound_749b (tests/beef_link_bump_749b.rs). The #749 bound shipped as the fix for GHSA-gvmh-f5gf-5vjj metered only stub.to_binary().len() — the transaction's four serialized fields — and a transaction's to_binary never serializes its attached proof (merkle_path). So the proof the linker clones into every proven transaction (in enter) and every stub (in bare_stub, and again at every repeat input's stub.clone()) was weighed as nothing. A BEEF of K proven parents sharing one K-leaf BUMP held ~2K deep copies of that O(K) path, uncounted: the default from_beef linked it with Ok, re-materializing O(K²) heap from a small answer (a counting allocator measured ≈3,080× amplification at K=2048, rising with size), reached through the overlay lookup resolver and every other door that parses a stranger's BEEF — the same out-of-memory kill / wasm32 abort the parent bound was shipped to refuse. The parent fix bounded the re-materialized output bytes of a shared parent spent by many inputs; it did not bound the proof bytes, which a single shared BUMP amplifies across many distinct parents with no repeat input at all.
  • What changed. src/transaction/beef/link.rs alone. add_input_proof charges the BUMP the linker clones at each of its ~2K sites. The fold-c above supersedes this fold's accounting: the BUMP is one copy in the wire but K copies in memory, a HEAP amplification, so fold-c charges its heap (bump_heap) to the new max_link_heap_bytes rather than its wire bytes to max_link_bytes — which keeps the published wire onsets unchanged (no one-output shift: 702 / 251 / 127, 993 / 354 / 180 stay, pinned by the_wire_onsets_are_the_published_0811_figures). No public type, signature, default or error class of this fold changes; BeefLinkLimits::unbounded lifts it as before.
  • Pinned by. tests/beef_link_bump_749b.rs (three cells: K=64 proven parents on one BUMP refused by an explicit 128 KiB budget where the pre-fix meter charged nothing and linked; the same answer linked unbounded; an honest single-proof BEEF unaffected), built by this crate's own writer and reader. The headroom pin the_default_headroom_is_stated_per_output_size and the shared-pool pin in tests/beef_link_bound.rs carry the new figures. RED verified on scratch copies of both published tips with the fix removed.
  • Migration. None. A BEEF of hundreds of distinct proven ancestors sharing one BUMP, linked by default, is now refused with Error::BeefResourceLimit instead of driving unbounded heap; a caller that trusts its source opts out with BeefLinkLimits::unbounded as before. The cross-SDK parity of the two folds is one note above (the references share the proof and the parent by reference, so neither carries this amplification; this crate owns them by value).
Commits
  • 5c56ac7 0.8.13: a security patch on the stable line (1 advisory)
  • a889e8c kvstore: GlobalKVStore selector queries enforce the query's controller, proto...
  • 4b5e310 0.8.12: a security patch on the stable line (1 advisory)
  • a01c6cb refactor(beef): split the #749 link-ancestry bounds into beef/link_limits.rs ...
  • 6b73baf fix(beef): a second heap bound on linking beside the wire bound closes the he...
  • 48828d2 fix(beef): the #749 link bound weighs the heap a repeat clone holds, not its ...
  • 7909ed1 fix(beef): the #749 link bound charges the proof a stub carries, not the tran...
  • a6b7da0 docs(security): where this crate's advisories are published, and that none is...
  • 9134220 feat(front pages): the front pages follow each release: the README says why, ...
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the bsv-stack group with 1 update: [bsv-rs](https://github.com/Calhooon/bsv-rs).


Updates `bsv-rs` from 0.8.11 to 0.8.13
- [Release notes](https://github.com/Calhooon/bsv-rs/releases)
- [Changelog](https://github.com/Calhooon/bsv-rs/blob/main/CHANGELOG.md)
- [Commits](Calhooon/bsv-rs@v0.8.11...v0.8.13)

---
updated-dependencies:
- dependency-name: bsv-rs
  dependency-version: 0.8.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: bsv-stack
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies, stack-line. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@github-actions
github-actions Bot enabled auto-merge (rebase) November 18, 2026 18:06
@github-actions

Copy link
Copy Markdown

Auto-merge (rebase) is armed: this PR merges itself when the required checks are green on a current branch (bsv-stack-lean #182). A merge to main deploys nothing.

@github-actions
github-actions Bot merged commit 96a55b5 into main Nov 18, 2026
12 checks passed
@dependabot
dependabot Bot deleted the dependabot/cargo/bsv-stack-3c35dd71cd branch November 18, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants