Skip to content

auto-import latest offsets from github - #44

Open
chisewaguri wants to merge 7 commits into
YuKongA:mainfrom
chisewaguri:offsets-auto-import
Open

auto-import latest offsets from github#44
chisewaguri wants to merge 7 commits into
YuKongA:mainfrom
chisewaguri:offsets-auto-import

Conversation

@chisewaguri

@chisewaguri chisewaguri commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
  • add offsets.json at repo root with all 23 known kernels (generated from src/kernels/*/offsets.h)
  • app fetches it from raw.githubusercontent on startup when the running kernel has no built-in or imported entry, so new kernels work without an app rebuild
  • ci workflow regenerates offsets.json whenever src/kernels/ changes and auto-commits the result

@chisewaguri
chisewaguri marked this pull request as ready for review August 17, 2026 10:35
@YuKongA
YuKongA requested a balanced review from Copilot August 17, 2026 10:35

This comment was marked as outdated.

@chisewaguri chisewaguri changed the title auto-import latest offsets from github + policy fixup retry auto-import latest offsets from github Aug 18, 2026
@chisewaguri
chisewaguri marked this pull request as draft August 19, 2026 09:01
@chisewaguri
chisewaguri marked this pull request as ready for review August 19, 2026 09:08
@chisewaguri

chisewaguri commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

i think this is ready

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Suppressed comments (2)

app/src/main/java/com/ghostlock/app/MainActivity.java:411

  • The downloaded table is mutable, unsigned content from main, yet these values are later trusted as kernel addresses by the native exploit. This bypasses APK signing: a compromised repository credential or unauthorized push could change behavior for installed apps immediately and cause attacker-directed kernel-memory access or crashes. Require a detached signature made by a trusted key and verify it with a public key pinned in the app before merging (or distribute updates through the signed APK/release channel).
                conn = (HttpURLConnection) new URL(OFFSETS_URL).openConnection();

tools/gen_offsets_json.py:32

  • The parser regex accepts negative hexadecimal literals, but this branch only recognizes strings beginning directly with 0x; -0x2 falls through to decimal parsing and raises ValueError, aborting regeneration. Handle the optional sign consistently.
def parse_val(v):
    v = v.strip()
    if v.startswith("0x") or v.startswith("0X"):
        return int(v, 16)
    return int(v)

Comment thread .github/workflows/update-offsets.yml
Comment on lines +434 to +435
File offsets = new File(getFilesDir(), OFFSETS_JSON);
mergeAndSave(offsets, existing, imported, false);
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@chisewaguri
chisewaguri marked this pull request as draft August 21, 2026 14:31
@chisewaguri
chisewaguri force-pushed the offsets-auto-import branch 2 times, most recently from 578e617 to d5e1e03 Compare August 23, 2026 06:52
@chisewaguri
chisewaguri marked this pull request as ready for review August 23, 2026 07:30
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.

2 participants