Skip to content

chore(deps): repin candle 65ecb58 -> c1e6756 + candle-llm -> 3d9fdf0 (upstream Cow::Owned UAF fix) - #222

Merged
michaeltrefry merged 1 commit into
mainfrom
claude/hungry-austin-f9f254
Jul 2, 2026
Merged

michaeltrefry merged 1 commit into
mainfrom
claude/hungry-austin-f9f254

Conversation

@michaeltrefry

Copy link
Copy Markdown
Collaborator

Why

The sc-9085 quant spike hit an upstream use-after-free in candle at our pin 65ecb58c: QStorage::from_data(Cow::Owned…) routes through as_t_slice, which took the Cow by value and returned a slice into its dropped buffer — silent garbage quantized weights (the borrow checker can't catch it: Cow's lifetime parameter is unconstrained for the Owned variant). Upstream fixed it in huggingface/candle#3493 (commit c1e6756a89, 2026-06-18) — eight days after our pin. Our Cow::Borrowed workaround (on the sc-9085 branch) stays regardless, but the footgun is gone at the source for every other future caller.

What

  • candle-core / candle-nn / candle-transformers rev 65ecb58c → c1e6756a89faefa888ea57b056394a0619925b87.
  • candle-llm rev d0ba3e6 → 3d9fdf0 in lockstep (candle-llm#46, merged) — its own candle pin had to move too, or the graph materialises TWO candle-core packages (same trap as the core-llm branch=main unify). Verified: the lock resolves ONE candle at the new rev.
  • No kernel re-vendor needed: candle-kernels/ is byte-identical across 65ecb58c..c1e6756a89 (the range is 4 commits: the UAF fix + three Metal-only SDPA fixes; no API changes). vendor/candle-kernels/VENDORED.md updated to record this.

Validation

Follow-ups

  • The SceneWorks worker re-pins candle-gen + candle-llm on its own cadence (standard lockstep; the worker's direct candle-llm dep must move to 3d9fdf0 when it takes this candle-gen rev).
  • The sc-9085 branch's candle_gen::quant workaround comment can now cite the upstream fix instead of describing an open bug (fold into sc-9086).

🤖 Generated with Claude Code

…(upstream Cow::Owned UAF fix)

Bump the workspace candle pin to pick up upstream huggingface/candle#3493
(commit c1e6756a89), the use-after-free fix in as_t_slice /
QStorage::from_data(Cow::Owned...) that the sc-9085 quant spike hit: the
helper took the Cow by value and returned a slice into its dropped buffer,
silently corrupting quantized weights. Our Cow::Borrowed workaround stays
(zero-cost), but the footgun is gone at the source.

The 4-commit range (65ecb58c..c1e6756a89) is the fix plus three Metal-only
SDPA fixes: no API changes, and candle-kernels/ is byte-identical across it,
so the sc-7544 vendored fatbin fork needs NO re-vendor (VENDORED.md updated
to record the new rev and why).

candle-llm re-pinned d0ba3e6 -> 3d9fdf0 in lockstep (candle-llm #46 carries
the matching candle bump) so cargo unifies ONE candle-core across the graph;
the intermediate d0ba3e6..3d9fdf0 candle-llm churn is the sc-8528 KV-quant
backout + docs, and candle-gen-joycaption links no candle-llm symbols.

Validation: full CUDA gate (scripts/check-cuda.ps1) green at the new revs on
sm_120 - 115 suites, 0 failures, including cuda_quant_smoke (the Blackwell
quant-fatbin guard). candle-llm's own CPU suite green in #46. The gate ran
against the pre-squash branch commit 1b3bc2f; the squash-merge 3d9fdf0 has
the IDENTICAL git tree (543b33bf), so the result carries over exactly.

Co-Authored-By: Claude Fable 5 <[email protected]>
@michaeltrefry
michaeltrefry merged commit 3e0a343 into main Jul 2, 2026
3 checks passed
michaeltrefry added a commit that referenced this pull request Jul 2, 2026
…n the repack comment

Our pin now carries c1e6756a89 (PR #222), so the workaround framing is stale;
Cow::Borrowed stays as free belt-and-suspenders across pin bumps.

Co-Authored-By: Claude Fable 5 <[email protected]>
@michaeltrefry
michaeltrefry deleted the claude/hungry-austin-f9f254 branch July 3, 2026 00:24
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.

1 participant