Skip to content

fix: reject start.sh downloads signed by a revoked or expired key - #7090

Merged
kuny0707 merged 1 commit into
tronprotocol:release_v4.8.3from
Little-Peony:fix/start-sh-reject-revoked-key
Nov 10, 2026
Merged

kuny0707 merged 1 commit into
tronprotocol:release_v4.8.3from
Little-Peony:fix/start-sh-reject-revoked-key

Conversation

@SeriousCoding789

Copy link
Copy Markdown
Contributor

What does this PR do?

start.sh now rejects a release jar whose signature was made by a revoked or expired release key. checkSign requires gpg to report the release key's signature good (GOODSIG) in addition to a VALIDSIG line with the release key fingerprint, and logs the release key has been revoked or the release key has expired before removing the download.

  • start.sh: checkSign reads the gpg status lines once and checks REVKEYSIG, EXPKEYSIG and GOODSIG for the release key.
  • shell.md: a signature made by a revoked or expired release key fails verification.

Why are these changes required?

Since #7003, checkSign accepts a signature when a VALIDSIG status line carries the release key fingerprint. gpg also prints VALIDSIG, and exits with 0, for a signature made by a revoked or expired key, which it reports as REVKEYSIG or EXPKEYSIG instead of GOODSIG. So --download, --upgrade, --release and the archive tool download installed a jar signed by a release key that had been revoked or had expired, and revoking the key did not stop it from being trusted.

This PR has been tested by:

  • Manual Testing: checkSign taken unchanged from start.sh before and after this change, run with real gpg 2.5.20 under macOS bash 3.2. The key server and the downloads are replaced by local fixtures, and the fixture key is structured like the release key (a certify-only primary key with a signing subkey).
Scenario Before After
Good signature verified verified
Signing subkey revoked verified rejected, revocation logged
Primary key revoked verified rejected, revocation logged
Signing subkey expired verified rejected, expiry logged
Jar modified, signature missing, or signed by another key only rejected rejected
Good signature plus a signature by an unknown key verified verified
  • bash -n start.sh; shellcheck reports nothing new.
  • Not run: gpg 2.2 on Linux, and the download of a real release.

Follow up

The release signing subkey F859BCB44A28290B expires on 2027-01-03. With this change, start.sh rejects its signatures from that date unless the subkey's expiry is extended and published to keys.openpgp.org and keyserver.ubuntu.com, from which start.sh fetches the key for every download.

Extra details

  • Only the release key's own signature is checked, so another signature in the same .sig file, for example by a new key during a key rotation, does not affect the result.
  • gpg names the key in GOODSIG, REVKEYSIG and EXPKEYSIG by its long key id, the last 16 digits of the fingerprint; the full fingerprint is accepted as well.

gpg also prints a VALIDSIG status line, and exits with 0, for a signature
made by a revoked or expired key, which it reports as REVKEYSIG or
EXPKEYSIG instead of GOODSIG. checkSign only looked for VALIDSIG with the
release key fingerprint, so start.sh installed a jar signed by a revoked
or expired release key. Require GOODSIG for the release key as well, and
log when the release key is revoked or expired.
@SeriousCoding789
SeriousCoding789 requested review from bladehan1 and removed request for 317787106 November 6, 2026 06:43
@halibobo1205 halibobo1205 added this to the GreatVoyage-v4.8.3 milestone Nov 6, 2026
@kuny0707
kuny0707 merged commit bffd8c6 into tronprotocol:release_v4.8.3 Nov 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants