You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
1bit-update --latest: 'newer' comes from the unsigned release tag (rollback/freeze); bind tag+channel into the signed SHA256SUMS #3448
1bit-update --latest (#3444, merged) takes the decision "this release is newer" from the GitHub release's tag_name, through update_pick's newer=. That tag is not covered by the release signature. #3442/#3447 sign DOMAIN + SHA256SUMS bytes, and SHA256SUMS lists file digests only.
Consequence (rollback / freeze):
Someone who can publish or replace release assets but does not hold the release key can do two things: a compromised token with contents: write, or a tampered mirror if one is ever added.
Rollback: publish an older, validly signed SHA256SUMS + SHA256SUMS.sig + image under a newer tag. --latest sees newer=yes, the signature verifies, and the box installs the old image, including any vulnerability it carried, for example a kernel CVE that a later release fixed.
Freeze: keep re-serving the current release, so the box never learns about a newer one.
The key holder's guarantee today is "this image was signed by us at some point", not "this is the newest release we signed".
Where it is decided:os/v3/puppy/embed/usr/local/bin/1bit-update (main):
update_latest reads _v newer from update_pick's JSON parse of the API response;
ONEBIT_UPDATE_ANY skips that check entirely.
Suggested fix:
Bind the release identity into the signed bytes. Add tag <tag> and channel <stable|test> lines to the signed message, either inside SHA256SUMS or as lines after the domain prefix. release_sign.py verify-image then returns the signed tag.
Decide "newer" on the signed tag.--latest compares the signed tag against the running /etc/1bit/release-identity with update_pick's ordering, and refuses one that is not greater. An explicit --allow-downgrade can override, and it prints a warning. The unsigned tag_name is then only used to find the assets.
Optional, for freeze: a signed "latest" pointer per channel with an expiry (TUF-style timestamp), so a box can tell "no newer release" from "I'm being shown a stale one". That's only worth it if the threat model calls for it.
Smaller and already mitigated, for the record: the image is verified (verify-image) and then re-read by zstd -d from the same path. The window is real, but /data/updates/<tag> is created by root (755), so only root can swap the file in between. It would reopen if ONEBIT_UPDATE_DIR pointed somewhere user-writable. Hashing during decompression, or refusing a non-root-owned UPDATE_DIR, would close that.
Found while reviewing #3442 / #3447 (lane cl-flm). Not exploited or tested on hardware: this is reading the code on main.
Update from lane cl-flm: the rollback half is fixed on main. 1bit-update (os/v3/puppy/embed/usr/local/bin/1bit-update, around lines 436-456) now reads the release identity from inside the verified image (etc/1bit/release-identity in its SFS, covered transitively by the signed SHA256SUMS). It refuses the install unless that tag equals the requested one and is strictly newer than the running release (update_ver_gt), so an old signed image re-published under a newer tag is refused. That's a better fix than signing the tag separately, because the identity is part of the signed bytes already.
Still open, and lower priority: freeze. Someone who controls what the box is served can keep serving the current release and hide a newer one; --check then says "up to date". Closing that needs a signed, expiring "latest per channel" statement (a TUF-style timestamp). That's only worth it if the threat model includes a compromised release host. Leaving the issue open for the owner to decide whether that's in scope.
Honest reporting now, plus the RFC draft (docs/update-trust.md): --check/--latest say when the running release is ahead of the channel's newest instead of a flat "up to date", and print that the answer is the unsigned list's word and what that cannot detect. Control: two new test arms fail on origin/main's updater and pass here; update_check + release_check_selftest green.
Still open: the freeze/anti-replay decision, which is yours — the RFC recommends option A (a signed, expiring "latest per channel" pointer at a fixed URL, same release key, new domain prefix, sums_sha256 binding, refuse install when unprovable), with B (TUF), C (signed tag-commit binding), D (tag+channel into SHA256SUMS — cheap, does not stop freeze) and E (accept the risk and close) laid out. Open questions are in §"Open questions" of the doc — the first is simply is freeze in the threat model?
I have not posted the RFC to Discussions; the draft is ready to paste when you want it, and the option-A implementation would follow acceptance.
Activity
bong-water-water-bong commentedon Nov 24, 2026
Update from lane cl-flm: the rollback half is fixed on main.
1bit-update(os/v3/puppy/embed/usr/local/bin/1bit-update, around lines 436-456) now reads the release identity from inside the verified image (etc/1bit/release-identityin its SFS, covered transitively by the signedSHA256SUMS). It refuses the install unless that tag equals the requested one and is strictly newer than the running release (update_ver_gt), so an old signed image re-published under a newer tag is refused. That's a better fix than signing the tag separately, because the identity is part of the signed bytes already.Still open, and lower priority: freeze. Someone who controls what the box is served can keep serving the current release and hide a newer one;
--checkthen says "up to date". Closing that needs a signed, expiring "latest per channel" statement (a TUF-style timestamp). That's only worth it if the threat model includes a compromised release host. Leaving the issue open for the owner to decide whether that's in scope.1bit-update --check: "up to date" is the unsigned list's word - say s…
bong-water-water-bong commentedon Nov 24, 2026
Delivered in two pieces, merged as #3474 (
fa0c8777):etc/1bit/release-identityinside the verified image's SFS before any slot write, refusing no-identity, mismatched, not-strictly-newer and rc-on-stable — so relabelled rollback is closed. Butupdate_pickchooses from GitHub's unsigned release list and--latestexits "up to date" before any signature is checked, so a host that keeps serving the current release (compromised token, deleted/draft newer release, a mirror) freezes a machine at "up to date" forever. No signed, expiring "latest per channel" statement exists.docs/update-trust.md):--check/--latestsay when the running release is ahead of the channel's newest instead of a flat "up to date", and print that the answer is the unsigned list's word and what that cannot detect. Control: two new test arms fail onorigin/main's updater and pass here;update_check+release_check_selftestgreen.Still open: the freeze/anti-replay decision, which is yours — the RFC recommends option A (a signed, expiring "latest per channel" pointer at a fixed URL, same release key, new domain prefix,
sums_sha256binding, refuse install when unprovable), with B (TUF), C (signed tag-commit binding), D (tag+channel into SHA256SUMS — cheap, does not stop freeze) and E (accept the risk and close) laid out. Open questions are in §"Open questions" of the doc — the first is simply is freeze in the threat model?I have not posted the RFC to Discussions; the draft is ready to paste when you want it, and the option-A implementation would follow acceptance.