Skip to content

fix(emulator): guarded crackme execution and structured sandbox verdicts - #200

Merged
sjkim1127 merged 1 commit into
mainfrom
codex/crackme-runtime-verdicts
Oct 12, 2026
Merged

sjkim1127 merged 1 commit into
mainfrom
codex/crackme-runtime-verdicts

Conversation

@sjkim1127

Copy link
Copy Markdown
Contributor

Summary

  • Supply the bounded x86-64 Linux HLE runtime guard/header contract from guest AT_RANDOM before main; keep existing TLS and static/interpreter/shared-library initialization intact.
  • Handle __stack_chk_fail as nonreturning termination rather than a fake successful return.
  • Make sandbox --json a complete JSON stdout document, with captured stdout/stderr bytes in the typed metrics report; reuse existing echo control and VFS storage.
  • Add owned JIT fixtures/regressions, a generic candidate-validation workflow and an evidence-based public crackme walkthrough.

Fixes #198
Fixes #199

Measured acceptance

Public Reversing-ELF crackme4 was solved from Fission string context, callgraph and disasm without source/solution text. Original + symbol-stripped copy, each with one correct and four incorrect/boundary inputs: 10/10 exact stdout, stderr and exit-status matches against Linux/amd64 process oracle. No input mutation or opcode/HLE/unknown-syscall/unhandled-userop misses. Both branches exit 0, so output is explicitly treated as the verdict.

Baseline halted on the unmapped FS guard read; its guest message also polluted JSON stdout. Candidate runs now halt cleanly at 417/419 instructions with structured output.

Validation

  • Focused nextest: 10 passed.
  • Full emulator + CLI nextest: 379 passed; 3 pre-existing ignored corpus/throughput tests.
  • Crate check/clippy with CI policy, locked release build, workspace fmt/diff checks and Python compilation passed.
  • Existing CLI/project/history smoke: 43 commands + 2 unchanged binary hashes, fresh DB directory.
  • JIT corruption test, alternate ABI rejection, existing-pointer/non-HLE preservation, modified AT_RANDOM seed, exact non-UTF-8 capture, Linux libc/syscall + Windows console JSON/text and metrics-file equality covered.

Limits

One beginner challenge plus its derived stripped copy, not independent samples or general crackme coverage. No automatic solving, ELF32 parity, packing/anti-debug support, full PT_TLS/DTV/pthread state or guest SIGABRT delivery. The failure HLE uses conventional status 134. Console capture is retained VFS descriptor content, not a redirection transcript. Docker is a validation oracle only; production remains Rust-owned and vendor-independent. No decompiler algorithm or ranking claim. Prior decompiler work and PR #176 preserved.

Report: docs/validation/2026-10-12-crackme-workflow.md
Walkthrough: docs/CRACKME_WORKFLOW.md

@sjkim1127
sjkim1127 enabled auto-merge October 12, 2026 00:44
@sjkim1127
sjkim1127 merged commit 52c81dd into main Oct 12, 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

None yet

1 participant