fix: handle hex2uint64 hitcode overlap for XZ2 Premium (aurora)#3
Open
hirorogo wants to merge 1 commit into
Open
fix: handle hex2uint64 hitcode overlap for XZ2 Premium (aurora)#3hirorogo wants to merge 1 commit into
hirorogo wants to merge 1 commit into
Conversation
On XZ2 Premium (SOV38/aurora_kddi), the required overflow size is 0x430f90 (larger than the default 0x400f90 for XZ2). This causes the overflow to corrupt hex2uint64 at ABL 0x006CFC, which maps to buffer position 0x0c50. The hitcode at 0x0c50 was disabled because it overlaps with the 0x0bf8 hitcode (0x0bf8 + 0x60 = 0x0c58 > 0x0c50). Fix: place a short branch (b #0x08) at 0x0c50 to redirect to 0x0c58, then place the full hitcode at 0x0c58. This preserves the 0x0bf8 hitcode's data word at 0x0c54 while properly handling the hex parser hit. This fix does not affect the regular XZ2 behavior since the hitcode at 0x0c58 is only triggered when the overflow reaches 0x006CFC. Tested on SOV38 with bootloader 1310-7079_X_Boot_SDM845_LA2.0_P_118. Co-Authored-By: Claude Opus 4.6 <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.
Summary
0x430f90instead of default0x400f90hex2uint64at ABL0x006CFC, causing"FAILFailed to get the number of bytes to download"0x0c50→0x0c58to avoid the 8-byte hitcode overlap with0x0bf8, then places a full hitcode at0x0c58Details
Related issue: #2
On XZ2 Premium, the USB buffer is larger than on the regular XZ2. The correct overflow size found via
-3binary search is0x430f90:At this size, the overflow reaches
hex2uint64at0x006CFC(buffer position0x0c50), which was previously commented out due to overlap with the0x0bf8hitcode (0x0bf8 + 0x60 = 0x0c58 > 0x0c50).The fix places
b #0x08(ARM64:0x14000002) at0x0c50, which only overwrites the far branch at offset0x58of the0x0bf8hitcode (used for unmatched sentinel hits). A full hitcode is then placed at0x0c58to handle thehex2uint64hit.This change does not affect regular XZ2 behavior — the hitcode at
0x0c58is only triggered when the overflow reaches0x006CFC.0x400f900x430f900x3fa0000x41cc000x988c10000x988bd000Test plan
1310-7079_X_Boot_SDM845_LA2.0_P_118oem unlock Y🤖 Generated with Claude Code