Skip to content

Fail closed on unverified TTS voice packs - #80

Draft
Blackspirits wants to merge 3 commits into
upl/review-base-4771from
fix/voice-pack-download-failclosed-4771
Draft

Fail closed on unverified TTS voice packs#80
Blackspirits wants to merge 3 commits into
upl/review-base-4771from
fix/voice-pack-download-failclosed-4771

Conversation

@Blackspirits

@Blackspirits Blackspirits commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

The new TTS Voice Manager downloads catalogued voice-pack ZIPs and verifies SHA-256 when a digest is present, but the downloader currently returns successfully when the digest is empty or the downloaded stream is empty. That turns a future catalog omission into an unauthenticated install path.

This change:

  • requires every voice pack to have a SHA-256 before any network request starts
  • rejects streams that cannot be safely read and rewound before download
  • verifies downloaded bytes against the catalog digest
  • rejects empty/tampered payloads instead of treating them as successfully verified
  • always rewinds the stream after hashing, including failure/cancellation paths
  • updates the VoicePack contract comment to make SHA-256 mandatory
  • leaves pack URLs, catalog contents, ZIP extraction and per-engine voice import behavior unchanged
  • adds regressions for all eight current catalog digests, missing-digest fail-closed behavior before HTTP, tampered payload rejection/rewind, a valid SHA-256 vector, empty streams and non-seekable streams

Validation

  • all seven Multilingual LibriSpeech pack hashes were independently compared with the sha256: asset digests published by SubtitleEdit/support-files release tts-voice-packs-2026-09; all seven match
  • the English standard pack hash was independently compared with the voices.zip asset digest published by SubtitleEdit/support-files release qwen3-tts-cpp-2026-5; it matches
  • the current installer only calls InstallPack after DownloadPack completes successfully, so integrity failure blocks extraction/import
  • the reviewed production/test blobs were transplanted unchanged from the initial 7c8a audit branch onto the current review base
  • full solution restore passed
  • full solution build passed
  • full solution test suite passed on the first run
  • retry step was not used
  • validation run: #34760450344
  • upstream later advanced to 9c0f6bdd77bc12bafff66f748b97c8b3d3a2d5b7; the two intervening commits modify only Turkish.json and do not touch the Voice Manager/voice-pack path

Base is upstream 4771a22765acdbdf5bd5b8a1c02f378c15e73ac9.

AI assistance: ChatGPT was used to audit the newly introduced Voice Manager download/install path, verify all current catalog digests against official support-files release metadata, strengthen fail-closed verification, and add focused regression coverage.

@Blackspirits Blackspirits left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent adversarial re-check: all eight current voice-pack catalog digests were reconfirmed against the two official SubtitleEdit/support-files releases; missing SHA-256 and non-seekable streams now fail before HTTP, empty/tampered payloads fail before InstallPack, and verified streams are rewound for the existing ZIP import flow. Full CI run #34760450344 passed restore/build/full tests on the first run with no retry. No blocker identified. Keep draft; no merge/promotion performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant