…o, and draft the freeze RFC (engine#3448)
Security review (cl-flm lane, 24 Nov). Issue #3448 has two halves. The rollback half is fixed by #3454
(69bb03f): --latest reads the release identity from inside the verified image and refuses anything that
is not the tag asked for and strictly newer. The freeze half is open, and it is a release-trust decision
(CONTRIBUTING.md: anything touching security is an RFC), so this commit does NOT invent a fix for it: it
stops the tool from claiming the freshness it cannot prove, and puts the decision on record.
Rebased onto origin/main a95beca (after #3465/#3466/#3467); the line references below are that tree's.
The mechanism, as it stands (os/v3/puppy/embed/usr/local/bin/1bit-update):
- update_pick decides which release is the channel's newest and whether it is newer than the running one,
from GitHub's release list (:257-302). That list is not signed; the first signature is checked at
:453-455, after the "is it newer" decision, and the early exit says "up to date" without checking any
signature (:430-438). So a release host that keeps serving the current release also keeps the machine
answering "up to date" (freeze).
What changed:
- update_pick prints ahead=yes when the RUNNING release is newer than the channel's newest (a final against
its own -rcs, or a channel that has not caught up), which used to be folded into newer=no (:291-295).
- update_check and update_latest answer that case "up to date: running X is newer than the CHANNEL's newest
Y" and print one note that the answer is the unsigned release list's word, so a host that hides a newer
release is not detectable (:328-336, :430-438). A plain "up to date" line is kept for the same-tag case,
so the console, the notice and the board rows keep reading it.
- docs/update-trust.md (new): what the signature covers today (tools/release_sign.py), the exact order
--latest decides in with file:line, what #3454 closed and what it leaves open, the freeze threat model
(adversaries, in/out of scope, P1-P3), and the draft RFC body: options A (signed, expiring latest per
channel reusing release_sign.py), B (TUF-style metadata), C (signed tag -> commit), D (tag+channel in the
signed SHA256SUMS), E (accept the risk), each with its trust assumptions and cost, the test plan and the
NOTICE impact, and the open owner questions.
- docs/os-v3.md, "In-system updates": a paragraph after the trust order saying what the order does not
prove - freeze, with the release-list/commit/rollback facts - and pointing at the draft.
- tests/update_check_test.sh: two arms (the ahead wording, the note), and the existing "a final release
sorts after its own release candidates" arm now asserts the ahead wording, which is what the tool says
there now. os/mini/release-check.sh --self-test gains that same output as a PASS fixture, so the
update-check row still recognises the answer on the board.
What remains open, and is the RFC's first question: is a compromised release host (freeze) in the threat
model? If yes, option A is the recommendation; if no, record that in docs/os-v3.md and close #3448. No code
in this commit closes it - the honest wording says exactly that.
Evidence:
- Control (new test, PRE-FIX updater from origin/main a95beca):
c=~/.cache/scratch-3448/control; mkdir -p $c/tests $c/os/v3/puppy/embed/usr/local/bin
git show origin/main:os/v3/puppy/embed/usr/local/bin/1bit-update > $c/os/v3/puppy/embed/usr/local/bin/1bit-update
cp tests/update_check_test.sh $c/tests/
(cd $c && sh tests/update_check_test.sh)
FAIL a final release sorts after its own release candidates (v2026.49 > v2026.49-rc1)
FAIL a running release newer than the channel's newest is said as ahead, not as a flat 'up to date'
FAIL the up-to-date answer names the unsigned release list it rests on, and what that cannot detect
update_check_test: FAIL
- Branch: sh tests/update_check_test.sh -> "update_check_test: ok" (12 arms).
- Sanity: the same control tree with origin/main's own test and updater -> "update_check_test: ok" (only the
arms this change adds or re-words differ).
- ctest --test-dir build -R 'update|release_check_selftest|release_sign' --output-on-failure --timeout 600:
"100% tests passed, 0 tests failed out of 12" (update_e2e_loop skipped: needs root/loop, unchanged).
- scripts/pre-pr-checks.sh --tree-only --base origin/main:
"pre-pr-checks: all 15 check(s) green, 3 skipped, 0 could not be told, 2 open-PR row(s) not run
(--tree-only)"; skips: submodule_pin (0 submodules initialised), hip_f16_audit and kernel_id_selftest
(no gpu-kernels tree).
Refs #3448.
Refs #3448 (does not close it: the freeze half is an owner decision, not a code fix).
What this is
Issue #3448 has two halves. The rollback half is fixed on
mainby #3454 (69bb03f):--latestreads the release identity from inside the verified image (1bit-update:812-819,update_identity_check:471-493) and refuses anything that is not the tag asked for and strictly newer. The freeze half is open: the "is there a newer release" decision still comes from GitHub's release list (update_pick,1bit-update:257-302), which is not signed, and the first signature is checked at:453-455— after that decision. Closing freeze needs a signed, expiring "latest per channel" statement; CONTRIBUTING.md makes that an RFC (anything touching security), not a code PR here.So this PR does two things, and deliberately no third:
--check/--latestnow say that an "up to date" answer is the release list's word (one note line), and distinguish "a running release ahead of the channel" from "the list has nothing newer" — both used to print a flat "up to date".docs/update-trust.md, in the style of the other security-relevant design records (docs/os-v3.md"In-system updates",.oss-scanner/threat_model.md): what the signature covers today, the exact order--latestdecides in with file:line, what 1bit-update --latest: install only the release it asked for, newer than this one - read from the VERIFIED image (rollback protection, security) #3454 closed and what it leaves open, the freeze threat model, design options A–E with their trust assumptions and cost, the test plan and NOTICE impact.The RFC is not implemented: no new file format, no new key, no new dependency, no signature scheme invented. The only code change is the reporting fix in (1).
What needs the owner (the RFC's first question)
Is a compromised release host (freeze) in the threat model?
latest-per-channel pointer at a fixed URL, signed with the existing release key via the existingtools/release_sign.pydomain-prefixed Ed25519 message (new domain prefix, no new dependency);--check/--latestverify it, use its tag as the newest, refuse to install when it is missing/expired/replayed, and keep 1bit-update --latest: install only the release it asked for, newer than this one - read from the VERIFIED image (rollback protection, security) #3454's identity check on the image. Option D (tag+channel in the signed bytes) folds into the pointer.docs/os-v3.md(the honest wording is already there) and close 1bit-update --latest: 'newer' comes from the unsigned release tag (rollback/freeze); bind tag+channel into the signed SHA256SUMS #3448.The draft body for the RFCs Discussion is
docs/update-trust.md; the open questions it ends with (pointer URL/TTL, fail-closed vs warn, replay-guard policy, signer role) are the decision surface.The reporting fix, in detail
update_pickgainsahead=(1bit-update:291-295): the RUNNING release is strictly newer than the channel's newest (a final against its own-rcs, or a channel that has not caught up). It used to collapse intonewer=no.update_checkanswers that caseup to date: running vX is newer than the CHANNEL's newest vY, keeps the plainup to dateline for the same-tag case, and prints one note that the answer is the unsigned release list's word, so a host that hides a newer release is not detectable (1bit-update:328-336).--latestdoes the same before its early exit (:430-438).docs/os-v3.md: a paragraph after the trust order says what the order does not prove (freeze) and points at the draft.tests/update_check_test.sh: two new arms (the ahead wording, the note); the existing "a final sorts after its own release candidates" arm now asserts the ahead wording, which is what the tool says there now.os/mini/release-check.sh --self-testgains the same board output as a PASS fixture, so theupdate-checkrow still recognises the answer.Evidence
Control (new test against the pre-fix updater from
origin/maina95beca):Branch:
Sanity: the same control tree with
origin/main's own test and updater →update_check_test: ok(only the arms this change adds or re-words differ).ctest rows (
cmake -B build ...then the row subset; no target build is needed for these rows):Gate:
Skips:
submodule_pin(0 submodules initialised in this branch worktree),hip_f16_auditandkernel_id_selftest(no gpu-kernels tree;$GPU_KERNELS_DIRunset).What I could not verify
SHA256SUMS.sigis not in this tree (this repo shipstools/release_sign.pyand bakes/etc/1bit/release-pubviaos/v3/puppy/cut.sh). The RFC's cost line for "one signing step beside it" is reasoned from that boundary, not measured.Review risk to look at first
The wording change is the only behaviour change: anything that greps
--checkoutput should still find the plainup to dateline for the same-tag case (console, notice andupdate_check_verdictall keep working; the new ahead line and note are additions). The RFC draft's recommendation (A) and its expiry/replay-guard policy are a proposal for the owner, not a decision this PR makes.