mirror of
https://github.com/morluto/rea.git
synced 2026-11-29 09:56:23 +00:00
* feat(native): list Mach-O function starts and data-in-code entries offline
The diff adds a static reader for LC_FUNCTION_STARTS and LC_DATA_IN_CODE
on one thin Mach-O or one selected slice of a universal file. Starts are
absolute VM addresses from ULEB128 deltas off the __TEXT vmaddr, and
each data-in-code entry reports offset, length, kind, and the function
start that owns its address, with one offset and limit applied to each
selected table and counts covering every entry.
inspect_macho_function_starts and inspect-macho-function-starts expose
that report, require architecture only for a universal file, and refuse
a combined table above max_entries with no partial result. The shared
load-command walk now yields each command once and stores the Mach-O
segment name and vmaddr on load regions, and the guides and limit docs
record coverage, paging, and the read and entry budgets.
* build: add advertised schema summary for inspect_macho_function_starts
* Address review feedback
* fix(native): bound function-start decoding and page before building rows
- Check each start against an interval index of executable segments, built
once, instead of scanning every segment per start.
- Walk LC_FUNCTION_STARTS once. Count and check every start and
data-in-code entry, but build result objects only for the requested page,
and resolve owners for that page during the same walk.
- Keep every declared Mach-O segment in the shared reader (macho_segments),
so a __TEXT with no file bytes still anchors the deltas, as
llvm-objdump does. LoadRegion no longer carries macho_segment.
- On 32-bit ARM, clear the Thumb tag (bit 0) from published starts and
report it as `thumb`, keeping the tagged value for the next delta, as
ld64 encodes and LLDB decodes. Wrap 32-bit images at 2^32.
- Intersect Evidence file ranges with the selected universal slice.
* refactor(native): normalize function-start format facts once
- One table, MACHO_DICE_KIND_NAMES, names data-in-code kinds for the
reader, the schema and the report check, which each had their own copy.
- Each linkedit command's dataoff/datasize is normalized once against the
slice (end, 32-bit fit, in-slice bytes) instead of the overflow check and
the in-slice length being recomputed in three helpers.
- Name CPU_TYPE_ARM, VM_PROT_EXECUTE and UINT32_MAX after their headers.
- Report coverage.text_not_at_header when __TEXT does not map file offset
0: llvm-objdump anchors the deltas on the __TEXT vmaddr and dyld on the
mach_header address, and they disagree there.
- Pin the fixture's expected starts to literal addresses.
* build: refresh the inspect_macho_function_starts schema summary after merging main
* fix(cli): keep lipo's flag name out of --architecture help text
The architecture help for four commands said "as lipo -thin does", which
the CLI option-alias check reads as a registered short flag `-thin`.
Describe the lipo behavior without spelling its flag.
* Revert "fix(cli): keep lipo's flag name out of --architecture help text"
This reverts commit 68f25adf74.
* refactor(cli): use the shared universal-slice help for inspect-macho-function-starts
* fix(native): bound decoding by max_entries and map data-in-code from the header
- Refuse a data table above max_entries from its byte count, and stop the
start walk at the remaining allowance, so the allowance bounds decoding
work. The refusal no longer claims a required_value it did not measure.
- Map each data-in-code offset as the mach_header's VM address plus the
offset, the way ld64 encodes it and dyld documents it. MH_OBJECT does not
map its header, so its base is 0. The shared container now carries
mach_header.filetype.
- Use the same header address for text_not_at_header, which also catches a
header shifted by SG_HIGHVM.
- Report a list that ends without its zero terminator as
unterminated_starts.
- Accept an observed empty section name in both result schemas.
* fix(native): tally LINKEDIT commands compactly and report a known entry total
- Count LC_FUNCTION_STARTS and LC_DATA_IN_CODE commands during the shared
load-command walk into a compact tally (two 32-bit words per command)
instead of retaining a view and an object for each one. The shared
visitor now hands over the image's byte order.
- When the image has no starts to decode, a data table above max_entries is
refused with its exact count as required_value.
* fix(native): report a non-Mach-O input as unrecognized, not malformed
Ask the shared Mach-O header recognizer before the thin reader. An ELF or
PE file passed without `architecture` has no Mach-O magic, so it is an
unrecognized target for this operation. A recognized Mach-O with a broken
or cut-off header still fails as malformed or truncated.
---------
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Documentation directory
Find an installation step, investigation guide, or contributor reference by task. The REA website has worked examples and product pages.
Getting started
- Installation and setup
- Supported targets and requirements
- Client configuration and troubleshooting
- CLI and Evidence
- Guided MCP prompts and completion
Desktop applications
- Desktop installation directories
- Desktop application capture
- Desktop application state
- Desktop application tasks
- Desktop application export
- Desktop build computer
- Desktop build witness
Agent environments
Native binaries
- Native binary investigation
- Go binary build metadata
- DWARF compile units
- Offline binary diagnostics
- YARA rule matches
- ELF separate debug files
- ELF and Mach-O initializer functions
- ELF unwind function ranges
- Mach-O function starts and data in code
- Linux kernel build config
- Recorded crash evidence
- Windows Shell Link shortcuts
- Acquired NTFS metadata
- Binary hardening
- ELF note tables
- ELF dependency tables
- Linux kernel modules
- PE Authenticode certificate tables
- PE import and delay-load tables
- PE TLS callbacks and load configuration
- PE x64 exception-directory function ranges
- PE overlay
- Match native functions across builds
- Rust binary dependency metadata
- Static CUDA and HIP code objects
JavaScript and Electron
- JavaScript Application Graph
- Cross-layer JavaScript application workflows
- JavaScript artifact reconstruction
- JavaScript source recovery
- Passive Node and Electron runtime observation
- JavaScript static/runtime reconciliation
- Electron file-page observation
- V8 code cache inspection
- Electron fuse state
- Static JavaScript route inventory
- Bun standalone executables
- Deno compile executables
- Node.js single executable applications
Browser and captured websites
- Website observation with CDP
- Browser scenario contract
- Website runtime source attribution
- Historical web network captures
- HTTP/3 capture lab
- Captured website source locations
- Captured website module relationships
- Captured website scripts and static JavaScript analysis
- Offline Playwright traces
Android applications
- Static Android APK analysis
- Apktool resource decoding
- ADB device inspection and acquisition
- Flutter build identification
- Android boot and vendor_boot images
- Android DTBO partition images
- APK signature schemes
Apple applications
.NET assemblies
- Managed-code analysis
- NuGet packages
- VS Code extension packages
- .NET single-file bundles
- IL2CPP metadata
Firmware
- Firmware analysis
- Android OTA update payloads
- Android Verified Boot vbmeta images
- Android sparse images
- UBI images
- Flattened devicetree inspection
- ESP flash images
- ESP images
- U-Boot FIT images
- Qualcomm MBN images
- Intel HEX and S-record images
- UF2 and DfuSe images
- U-Boot legacy uImage containers
- uClinux bFLT flat executables
HarmonyOS packages
Packages and metadata
- Offline API contract inventory
- CycloneDX dependencies
- Maven POM and Gradle module metadata
- OCI image layouts
- Release exposure
- Model file declarations
- Python packaged applications
- Debian package inspection
- CPython pyc inspection
- Erlang BEAM files
- Godot PCK archives
- UnityFS AssetBundle archives
- iNES containers
- Nintendo DS ROMs
- Nintendo 64 ROMs
- WeChat mini-program wxapkg archives
- macOS flat installer packages
- ISO 9660 disc images
- tar and gzip-compressed tar archives
- Nintendo Switch NSO and NRO executables
- GPU asset headers: DDS, GLB, KTX and KTX2
WebAssembly
EVM contracts
Databases and recorded packets
Process capture and instrumentation
Provider setup and formats
- Ghidra provider semantics
- DOS MZ and COM analysis with Ghidra
- Optional NativeAOT metadata recovery
- MIPS ELF analysis through Ghidra
- PSP static ELF analysis through Ghidra
- RISC-V ELF analysis through Ghidra
- Windows Ghidra P0
- Headerless raw-binary analysis with Ghidra
- IDA provider
- JEB instrumentation and analysis
- GameCube DOL analysis through Ghidra
- PowerPC ELF analysis through Ghidra
- Kuna provider
- Reverse-engineering tool integrations
Contracts and evidence
- MCP runtime contracts
- Target failures
- Directory identity
- Reconstruction obligation ledgers
- Reconstruction coverage
Development and verification
- Documentation ownership and authoring
- Settings and recovery
- REA limit inventory
- MCP tool design
- Testing REA
- Client and agent verification
- Reconstruction readiness conformance
- Releasing REA
- Testing lanes and provider verification
- Measure MCP catalog costs in Codex
- Static analysis in GitHub Actions
Release migrations
Signal recordings
Generated files and release records
| Path | Owner and update command |
|---|---|
public/product-catalog.json |
Ignored contract projection; npm run docs:generate |
verification/managed-conformance-*.json |
Ignored managed conformance projections; npm run evidence:generate |
error-contract.schema.json |
Tracked schema from contracts; npm run docs:error-schema |
user-visible-errors.csv |
Generated error code and category per domain and provider-owned error case; npm run docs:error-schema |
releases/<version>.contributions.json |
Durable release contribution record; follow the release guide |
Regenerate catalogs and Evidence projections from their canonical source.
Release records preserve the exact commit messages and references for each release.
Guides share authored images in assets/.