mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8408] [Design] Connect indirect call investigations to Mach-O slot bindings #6589
Open
opened 2026-11-01 21:12:29 +00:00 by bsakaguchi
·
3 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#6589
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @morluto on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8408
Before submitting
Decision needed
When investigating a call through a selected Mach-O pointer slot, should REA expose the slot's file-declared loader binding as evidence, so an analyst can correlate the observed call and its imported symbol without inferring identity from a generated provider name? If so, should this extend an existing inspection or be composed into a task-level call-site workflow?
Context and evidence
On REA main
6e9ee97a, Ghidra 12.1.4, macOS arm64 and MCP SDK 2.3.1, I statically investigated the shipped Homebrew Brotli 1.2.0libbrotlidec.1.2.0.dylib(SHA-256d7ac1e69b6c443341fb4302de0169d187489d58d8a641c8eadd6db9ca2cd0cbf). Its_BrotliDecoderDecompressreads slot0xc000and calls through a register at0x14dc.procedure_referencesreported the read of0xc000and Ghidra's computed-call reference to a___chkstk_darwinthunk.inspect_address_contextnamed the slotPTR____chkstk_darwin_0000c000, andxrefsreturned the read site. These are useful provider observations; the generated name is not itself a file-declared binding record.inspect_machoincluded the___chkstk_darwinimport fromlibSystem, but itsaddresswas null. The tested public results did not provide an explicit slot-to-binding record for0xc000.dyld_info -fixupsreported0xc000as a bind tolibSystem/___chkstk_darwin. A direct local invocation of REA's internal Mach-O fixup decoder also returned a chained bind, symbol___chkstk_darwin, library/usr/lib/libSystem.B.dylib, ordinal 1, weak false and addend 0 at0xc000; adjacent slots0xc008and0xc010decoded as different imports. This confirms one producer can decode this input, not that the fact is currently exposed by a public REA tool.All successful public MCP calls used the fetched compact advertised schemas. The target hash was unchanged and it was not executed. One image, one architecture and one provider were tested. The
trace_native_valuescontrol was limited to depth zero and reported that limit; it does not establish whole-program value flow. Existing Ghidra names and thunk references are usable alternatives, and the nativedyld_infocommand can provide independent file evidence.Expected interaction with targets
Read existing files or captured data; launch local analysis tools when the caller selects a provider. No target execution or mutation is proposed.
Boundary details (optional)
A binding is a static loader declaration, not proof of the pointer's runtime value, call reachability, or an exhaustive computed-target set. Preserve selected slice, original symbol/library identity, ordinal, weak/addend and fixup provenance, with unsupported/unknown/partial states. Do not infer a binding by matching display names or automatically exempt import-slot calls from #8340's coverage limitation.
Options and tradeoffs
Consider exact requested slot addresses in an existing native inspection, or an address/call-site investigation that composes provider read/call observations with separately identified file binding evidence. A whole-image binding inventory might be useful for other tasks but is not required by this example. The existing Objective-C class-binding input is scoped to class imports; a generic binding should not be mislabeled as an Objective-C class. Any approach needs bounded input/result handling and clear slice/target identity.
Verification available so far
I have observed results; there is no product prototype. Suggested checks: this chained-bind example, a distinct bind, rebased/raw/unbound slots, unsupported or malformed fixups, non-UTF-8 names, slice selection, and public CLI/MCP Evidence provenance. Legacy and arm64e cases, other providers and actual autonomous-agent behavior remain untested.
Success criteria and open questions
An analyst can distinguish a provider's computed-call candidate, the file's declared slot binding, and unknown runtime state without parsing another tool's display text. It remains open which existing contract owns that handoff and which inputs/formats deserve support.
References
Related: #8277, #8200, and the shipped-library control on #8340. The reusable producer is
AppleMachoFixups.ts; Objective-C-only projection isAppleObjcClassImportBindings.ts.Maintainers: @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
Kuna 1.988 import-slot path control
On REA
bafe3784cplus the version-only #8509 change and the previously described owned import-slot fixture, real Kuna 1.988 compact stdio MCP returned incoming slot references at0x1360,0x1364, and0x1368, where the direct Kuna JSON labels them data/address formation, read, and indirect call.procedure_callees(_audit_import_call)returned0x4000with partial indirect-call coverage; 1.986 returned no callee for the same fixture. Direct Kuna 1.988's graph labels the0x4000nodekind: importnamedmalloc. REAtrace_call_path(_audit_import_call, malloc)returnedreachedon its observed edge to0x4000, with partial coverage and explicit residual unknowns. Its path nodes carry addresses rather than the graph's import classification;inspect_address_context(0x4000)reports the provider namemallocbut no separately established file binding. The same path on #8443 headb7160bd7reports observed-graph reach with discovery unknown. The target was unchanged and not run. This is not a claim about the runtime pointer, runtime call, or exhaustive targets; the existing binding question remains distinct from an upstream provider's inferred call edge.@morluto commented on GitHub (Nov 1, 2026):
Same shipped Brotli 1.2.0 image and
0xc000slot, now tested through real REA/Kuna 1.986 on main6e9ee97a, macOS arm64, MCP SDK 2.3.1 with fetched compact schemas:inspect_address_context(0xc000)andaddress_namereturned Kuna's analyzed name__chkstk_darwin;inspect_machoseparately returned the import___chkstk_darwinfromlibSystemwithaddress: null. These are useful existing clues, but the tested responses did not expose an explicit file-declared0xc000binding.xrefs(0xc000)returned an empty list with the existing warning that emptiness is not proof of absence. Direct Kunaxrefs --to 0xc000also returned no rows, whereas the independent disassembly and Ghidra's typed outgoing reference identify a read at0x14d8. This is one provider observation, not a claim about all import slots or a reason to silently substitute Ghidra's answer.resolve_native_call_targets;procedure_calleesretained the four observed callees and reported partial callee coverage due to indirect calls. The known path from_BrotliDecoderDecompressto_BrotliDecoderDecompressStreamwasreachedwith that partial coverage; the path to_BrotliDecoderVersionwasunknown. Both path records survived export/import into a fresh target-free server unchanged.The image SHA-256 stayed
d7ac1e69b6c443341fb4302de0169d187489d58d8a641c8eadd6db9ca2cd0cbf, both sessions closed, and no target code was executed. This adds a concrete Kuna handoff case; it does not turn the file binding into a runtime target or demonstrate coverage on other hosts or images.A separate source-owned minimal
_mallocGOT-load control reproduced the missing Kuna slot xref while Ghidra reported the load; upstream report: Noelo-Lab/kuna#1376.@morluto commented on GitHub (Nov 1, 2026):
A value-flow handoff control on the source-owned
_mallocGOT fixture from Noelo-Lab/kuna#1376, using real Ghidra 12.1.4 and Kuna 1.986 through MCP on macOS arm64:trace_native_valuesfor_audit_import_callwithmax_depth: 0retained aCASTwhose input location is0x4000, a derived def-use edge to theCALLINDat0x1368, and a separate resolved-indirect provider call edge. The AST operations carryis_dead: trueandblock_membership: member; these are the reported Ghidra model facts, not proof of live execution or runtime target identity. The trace explicitly reports the depth limit and unavailable/omitted parameter bindings.dyld_info -fixupsobservation for the same file declares0x4000bound tolibSystem/_malloc. The tested REA value trace does not itself include that loader-binding record. Keeping these facts separately attributed would let a consumer assess the handoff without treating the file binding as an exhaustive runtime call target.Provider has no native def-use model; it did not invent a slot-to-call value-flow edge. This differs from its decompiledmalloc()text and the empty slot xrefs in #1376.Exporting and importing the trace Evidence preserved its normalized result and limitations for both providers. On current main, some source Evidence IDs cited by the traces were absent from the imported bundle; the candidate in #8384 retained them and their views resolved. The target SHA-256 stayed
62da83d290c7b276d8708937930ef12f469f41782710fed439001c01c2747c76, and it was not executed. This is one static fixture with a deliberately selected depth limit, not a coverage or performance estimate.@morluto commented on GitHub (Nov 1, 2026):
A useful existing Ghidra-side coordinate and byte-provenance control on the same source-owned import-slot fixture:
resolve_native_call_targets(0x1368)reported the computed-call candidate0xc000.inspect_address_context(0xc000)identified Ghidra's/usr/lib/libSystem.B.dylib::_mallocthunk, withthunk_target: "EXTERNAL:0x1".address_to_file_offset(0xc000)refused with an explicit uninitializedEXTERNALblock reason;read_bytesreturned zero of four requested bytes andcomplete: false.address_to_file_offset(0x4000)mapped the actual GOT slot to file offset0x4000. Ghidraread_bytesreturned analyzed memory00c0000000000000and explicitly stated that loader fixups are included. Independent direct file-byte inspection at that offset returned0000000000000080.inspect_native_load_imagereported a source mapping for__got, an uninitializedEXTERNALmapping, and an applied relocation at0x4000retaining exactly those original and memory byte strings. It reports independent verification unsupported for this Mach-O; these are Ghidra observations, not a verified reconstruction. Native-load-image mapping and relocation views matched exactly after Evidence export/import into a fresh target-free server.address_name(0x4000)returnedmalloc, while the load-image, raw-byte and offset tools returned capability unavailability. No provider switch or implicit fallback was performed.This shows an existing way to keep Ghidra's synthetic candidate, initialized memory and original file bytes distinct. It does not provide the explicit file-declared slot-to-library binding proposed here, establish runtime addresses, or justify comparing provider coordinates without provenance. All successful MCP responses used fetched compact schemas; the fixture SHA-256 stayed
62da83d290c7b276d8708937930ef12f469f41782710fed439001c01c2747c76and it was not executed. The result is one macOS arm64 sample, not a general loader or format claim.