Repository navigation
Security audit fixes for B13 - #471
Merged
Merged
Conversation
…log hygiene) 1. Verify Signature: refuse clearsigned files with text outside the signed block. gpg --verify reports VALIDSIG even when unsigned lines surround a clearsigned block (confirmed on GnuPG 2.4.9), and Check SHA256Sum hashed every line of the raw file, so an added "<hash> <file>" line was shown as a matched, signed checksum. Embedded-signature manifests are now hashed only from the text gpg --decrypt reports as signed. 2. Provision MicroSD: sd_update.txt is unsigned, and the image names it lists were joined onto the card root, so "../x" copied files outside the card. Only bare filenames are accepted, refused before anything is written. 3. Redact encryption_key (EncryptedQR/KEF passphrase) and text (Text QR content) from Destination reprs, which are logged at INFO. 4. Clear Luckfox release-signing keys (BIP85 cache and unconsumed SeedKeeper-loaded keys) on Home and in the inactivity wipe. 5. Air-gap digest signing: warn that digests are signed blind and require a confirmation before keys are loaded. 6. GPG status parsing: take the primary-key fingerprint from VALIDSIG's last field so subkey-signed releases match the trusted-signer whitelist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes findings 1–6 from the B13 release security audit. To be merged as part of B13.
Fixes
gpg --verifyreportsVALIDSIGeven when unsigned text is added before or after a clearsigned block, or a second block is appended. Confirmed on GnuPG 2.4.9. Check SHA256Sum then hashed every line of the raw file, so an added<hash> <file>line showed as a green "Matched SHA256". Clearsigned files with any content outside the signed block are now refused. Manifests with an embedded signature are hash-checked only from the textgpg --decryptreports as signed, never from the raw file. Detached.sig/.ascbehaviour is unchanged.sd_update.txtis unsigned, and the image names it lists were joined onto the card root, so a name like../xcopied a file (as root) outside it. Only bare filenames are now accepted. Bad names are refused before the write-length fix or any copy happens.encryption_key(the EncryptedQR/KEF passphrase) andtext(typed Text QR content) are now redacted fromDestinationreprs, which are logged at INFO.clear_signing_keys()._parse_gpg_verify_statusnow takes the primary-key fingerprint from the last field ofVALIDSIG. Releases signed with a subkey now match the trusted-signer list, which holds primary-key fingerprints.Tests
devand pass here.dev: two need compiled.motranslations that aren't built locally; one is a local pysatochip install older than the pinned build.🤖 Generated with Claude Code