Commit Graph
6 Commits
Author SHA1 Message Date
fl0l0u 444b85158b scripts: hfget refuses names curl cannot fetch faithfully
A listing entry named "weights.bin#x" downloaded cleanly, checked clean,
and was the wrong object. curl ends a URL path at '#' and '?': it
requested "weights.bin" while hfget recorded the entry as
"weights.bin#x". An attacker who lists the truncated object's real size
and oid under a decorated name passes the size check, the oid check and
the manifest -- the bytes arrive under a name nobody asked for, and the
directory reads complete. hfget's name screen checked traversal, control
characters and its own manifest, but not curl's path terminators.

The jq screen now refuses any entry whose name carries # or ?. The child
that writes each file re-screens its name too, and its old case missed a
name ending in "a/.." (the parent's regex caught those, the child's did
not) as well as the terminators -- both arms added, the `?` quoted so it
stays literal and not the single-character wildcard. Two hfget tests: a
listing carrying "model.bin#x" is refused whole, and a child handed
model.bin#x, model.bin?y or sub/.. refuses before any request or write.
2026-11-15 20:38:10 +00:00
fl0l0u 965a7caa51 hf: a lone container does not outrank weights beside it
Give --model org/repo and the engine picks what to serve from the fetched
directory: one .rad on the top level won outright, whatever else was
there -- and .rad was not in the skip list a safetensors set imposes on
.bin/.pth/.gguf, so hfget fetched the rival too. A repository that ships
a real safetensors set beside one decoy .rad chose for the operator: the
container wins, the engine loads and serves it in place of the model the
operator named.

hf_served_path no longer resolves that tie by rank -- a container among
safetensors or gguf weights is refused by name and the operator passes the
file they mean -- and hfget skips .rad when a safetensors set is present,
as it skips every other rival. A repo holding only a container still
serves it: the fix is against the silent tie-break, not against .rad.
2026-11-15 20:38:10 +00:00
fl0l0u 1577854d00 hfget+deploy: fetch a repo on verified claims, and run with a key argv cannot show
The --model repo-id path trusts the hub with the machine's filesystem and
the container runs with the kernel's door off. Both stop here.

hfget.sh trusted a listing's file names to be names: an absolute path or
a .. segment wrote wherever the destination's owner could write, and a
name shadowing .hfget-manifest taught the next run whatever it liked. A
listing is now vetted whole before anything is fetched -- absolute
paths, .. segments, control characters (a tab splices one entry into two
fields), names of hfget's own manifest -- and a child refuses a path
that would escape anyway. Silent skipping was the alternative, and it
leaves a directory that reads as complete and is not.

And the content key was the hub's claim, never checked: an LFS file was
kept for its size and its claimed oid recorded without ever hashing the
download, so a swapped file of equal length -- or a spliced resume at
any length -- passed forever after. The download is hashed on arrival
and kept only when it matches the claimed sha256; a mismatch deletes the
file, and the manifest now certifies verified content.

--model-revision REV fetches at a branch, tag, sha or refs/pr/N instead
of the moving main: without it a restart can serve weights nobody
reviewed, and the guide now says to name one.

--api-key-env NAME reads the key from the environment, where only the
process and root can reach it, not the command line where every process
on the host reads it in ps; an unset or empty variable refuses startup
exactly like an empty --api-key. The compose files carry the key
through environment: now -- the fail-closed :? guard moves with it --
across all 52 model files.

And the containers' seccomp=unconfined has a way out: Docker's default
profile, plus exactly the calls that forced the escape -- io_uring for
the n-gram table, mbind/set_mempolicy/get_mempolicy for ROCm's NUMA
binding -- is shipped as seccomp-radiance.json and selected through
RADIANCE_SECCOMP; the default stays unconfined until each operator
audits their own card stack. Verified: under the profile io_uring_setup
and set_mempolicy behave as under unconfined and a non-listed syscall
earns EPERM.

hf_model_test: the escape-listing refusal, the oid verify (bad rejected
and deleted, good certified), the pinned revision fetched -- against a
fake curl for a hub. config_test: --api-key-env fails closed unset,
reads the key set. ASan+UBSan: config/diag/hf_model/server/transport/
wire/lifecycle, 8/8.
2026-10-31 07:50:43 +01:00
zivius 61abb990ab core/format: a torch.save checkpoint beside the safetensors, read as data -- stored zip entries mapped, the pickle run by a weights-only machine that refuses any other global or opcode by name; hfget fetches a .pth that is not the weights again (Fish Audio drama-3's codec) 2026-10-20 23:07:33 +02:00
Deadcode 1e968f6e1d radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves
  every shipped container
- Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime
- /v1/messages works with Claude Code as it ships (gearwave00001)
- a long agent conversation keeps its cached history when the client rewrites its last turn
  (manueloverride)
- a stream's first event goes out with the first token, so llama-benchy measures prefill right
- opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42)
- four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b)
- NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA
  adapters (baKon)
- many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool
  arguments and the CPU's vision and audio encoders
- plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
2026-10-16 18:25:18 +02:00
Deadcode 89cee7ce41 radiance 1.3.0
- #47: llama-server's request fields, routes and sampler order, and /props (with baKon's model
  entry: max_model_len, root and capabilities on /v1/models, and /v1/models/:id)
- new APIs: Anthropic's Messages API (/v1/messages), OpenAI's Responses API (/v1/responses),
  llama-server's /completion and /infill, logprobs (OpenAI's logprobs and top_logprobs, up to
  20; llama-server's n_probs), OpenAI's legacy `functions`, and X-Api-Key beside the bearer key
- #4: --model takes a Hugging Face repo id (owner/name), fetched before startup into
  ~/.cache/radiance/hf or --download-dir and checked for changes at every start (redxherring)
- #46: --tp 3 --tp-wire wht6 serves -- a three-rank two-shot all-reduce with uneven shards and
  the tiered-int8 wire over it (baKon); scripts/cardclock.py names what holds each card's clock
  under load (baKon)
- CPU-only serving works again; --kernels names the kernel libraries to load; a model the
  loaded libraries cannot fully serve refuses at startup instead of failing its first request;
  --vram-kv-mib and --vram-weights-mib are gone (the split is automatic)
- --embedding-placement ram is the default, and `auto` is gone
- #40: Swift 1.5 recipes; rad-convert reads which shard holds a tensor from the index
- #53: the pinned host pool gets huge pages where shmem THP is off; #57: a crash on video with
  an odd frame width is fixed
2026-10-08 18:22:08 +02:00