Repository navigation
fix: a merged update is accepted when hactool's unverifiable signature checks print (FAIL) - #46
Merged
Conversation
…e checks print (FAIL) hactool also checks the NCA's fixed-key signature and the NPDM signature. Without Nintendo's public keys it can only report those two lines as (FAIL), which the merge step's log scan read as a data failure: the build stopped with "BKTR verification failed" although every IVFC level was (GOOD) and the image matched the version's pinned SHA-256. Filter those two lines out of the log scan; the six IVFC levels and the image SHA-256 remain the deciding checks, and the failure log still keeps the whole output. Add a regression test that mocks hactool printing both lines on a successful merge.
ly05010419
added a commit
that referenced
this pull request
Oct 20, 2026
…ultrawide HUD, 1.4.3 survey, mods, controls.txt) into the Breath of the Wild branch Resolved by hand: nvn_mtl.m (PR #34's paged-bitmap serial sets keep the serial forgetting of 635fb31: totk_serial_del clears a bit; the memory line shows both; the BotW frame reset stays in mtl_present), build_app.py (make -j and the per-game launcher defines), the Makefile (the BotW targets and the Opus test), loader.c (the #57 stale-reference handler and 1.4.3's survey return address are TOTK-only: Breath of the Wild has no GAME_ADDR for them), world_survey.c (BotW keeps its stub, with runtime_survey_sync), README (both update-history rows). Found by the merged build: Breath of the Wild lacked runtime_output_size_current (frontend.m's shortcut text) and runtime_survey_sync (hle_nvn.c); and the add-on content file handles shared fs_host.c's 0x200000000 range, so closing a host file at the title ended the game ("close invalid add-on content handle"): they now start at 0x400000000. Tested on the merged binaries: TOTK 1.2.1 jump session (anomalies 0, occlusion normal, serial set 48,606 / 13 pages), Breath of the Wild DLC + key 3 (k3a6) and key 2 (k2c, 11 of 12 pairs within 5 px). Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
hactool also checks the NCA's fixed-key signature and the NPDM signature. Without Nintendo's public keys it can only report those two lines as
(FAIL), andmerge()scanned the whole log for(FAIL)— so a merge that succeeded stopped withValueError: BKTR verification failedeven though all six IVFC levels were(GOOD)and the extracted image matched the version's pinned SHA-256 (verified on 1.0.0 + 1.4.3:romfs_sha256 797e66f2efa5b99bdafe4af2d6e778a5ef2f2ca5dc3b45136dd601daea419e9b, the value pinned for 1.4.3).The pinned fast path stays as it was; only those two declaration lines are filtered before the failure scan. The six IVFC levels and the image SHA-256 are still the deciding checks, and the failure log still keeps hactool's whole output (long hex still redacted).
games/totk/scripts/extract_update_romfs.py: buildchecked= log minus the two signature lines; the failure branch andrequire(...)judgechecked, the failure log still writeslog.tests/test_updates.py: regression test with a mock hactool that prints both lines plus all sixLevel i (GOOD); the merge is accepted and its output image compared.python -m unittest discover -s testspasses (84 tests; the two that needcryptographyrun withgames/totk/requirements.txtinstalled).Fixes #44.