mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8336] [Design] Clarify or represent direct memory varnodes in native value-flow effects #6552
Open
opened 2026-11-01 21:12:10 +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#6552
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 (Oct 31, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8336
Before submitting
Decision needed
How should the native value-flow workflow expose or qualify direct memory varnode reads and writes, so that an empty
value_flow_effectsview is not mistaken for an absence of memory access?Context and evidence
A source-built x86-64 ELF contains four small functions: a direct volatile global setter/getter, and corresponding setter/getter through a pointer parameter. Independent
llvm-objdumpshows one memory write and one memory read in each pair. On REAa989c0ewith real Ghidra 12.1.4 through MCP:native_value_flow.effectsCOPYfrom parameter to address varnode0x103438[]WRITEto0x103438COPYfrom address varnode0x103438[]READfrom0x103438STOREmemory_writeLOADmemory_readAll four value flows were available and untruncated for the selected limits. The retained
value_flow_effectsview for each direct function returned an empty, exhausted view with no unknowns; its limitations say that memory effects can include stack and temporary accesses, but do not explicitly say direct address-varnode reads/writes are excluded.trace_native_valuespreserved theCOPYoperations and also returned no residual unknowns for these examples. Real CLIrea function ... --detail completereproduced the direct-setter empty effect list and pointer-setter write effect.The current implementation is consistent with its internal definition:
addPcodeEffectcreates memory effects forLOADandSTOREopcodes; the domain type describes effects as p-code-named operations. This report does not claim the collected p-code operations or empty page are wrong. The question is whether that scope is sufficiently explicit/useful to an agent asking what memory a function accesses. Ghidra's p-code documentation definesCOPYbetween varnodes andLOAD/STOREfor dynamic pointer dereferences.Expected interaction with targets
Read caller-selected binaries and provider analysis; no target execution, injection, mutation or provider switch is proposed.
Boundary details (optional)
Keep high-p-code observations, instruction-level reference classifications, runtime accesses and persistent-state inferences distinct. Memory-space inputs/outputs can occur on operations other than
COPY; stack, register, unique, overlay and other address spaces must not be conflated. High p-code can include detached or synthetic operations: this fixture also contains a return-time self-copy of the global, which must not be blindly counted as a second machine write. Some memory addresses or aliases can remain unknown. The current effect schema indexes operation inputs, while a direct write can have its memory location in the output, so a change may need a different typed representation.Options and tradeoffs
At minimum, make the existing effect projection's
LOAD/STOREscope and the meaning of empty coverage explicit, and point to independently observedprocedure_referenceswhere supported. Alternatively, design an evidence-backed representation of direct memory-space varnode accesses, preserving source operation/operand location, provenance, synthetic membership and uncertainty. Do not silently combine high-p-code effects with instruction references or promote static observations to runtime facts.Verification available so far
I have a prototype or observed results.
Success criteria and open questions
Use an unmocked CLI/MCP fixture with direct global and pointer reads/writes, plus synthetic-return/self-copy controls; test truncation, missing operations, stack and non-default address spaces. Explicitly verify both positive effects and honest no-match coverage. The four controlled functions above do not establish completeness on other architectures or arbitrary Ghidra projects.
References
Related: #8190 (outgoing reference evidence), #8283 (bounded graph coverage). Fixture SHA-256
e8f487fb48af4db5dc1d20067e6f1f69c4ecc2bb024cf480a70829fdd7528eef, unchanged; target not executed. Node 24.22.1, macOS arm64, Ghidra 12.1.4, real x86-64 ELF analyzed statically.@gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
Independent x86-64 outgoing-reference control
With real Ghidra 12.1.4 through REA compact stdio MCP at
ae8223cc, another source-owned x86-64 ELF contains separate direct RIP-relative global read and write, address-only LEA, pointer-parameter read, and immediate-only functions. Independent disassembly confirms the five instructions.procedure_referencesreported READ/WRITE/DATA for the first three, but returned empty recorded reference lists for both the indirect read and immediate-only functions.analyze_functionreported one high-p-codememory_readeffect for the indirect read and no effects for the direct global read/write, address-only or immediate-only functions. This corroborates the complementary scopes rather than showing either representation is complete. The unexecuted target SHA-256d3baa5cf385b68e3a8de02ed0884d9c9e781bd2c6b63201250635e4dc37655e8was unchanged. Full and compact profiles were checked for references and assembly; the dossier was checked in compact only. Related #8190 records direct Kuna controls on the same fixture.Retained Evidence handoff control
Draft #8651 adds the
LOAD/STOREscope limitation at the Ghidra producer and carries it into retained native views. With real Ghidra 12.1.4 on the x86-64 direct-read fixture above, I exported one dossier from baselineae8223ccand one from #8651 headda308f399. In fresh target-free MCP sessions using compact and full profiles, the new retained effects view preserved the limitation; the imported older record remained unchanged and its view did not gain a limitation that the historical source never recorded. Both bundles and the target kept their SHA-256 values. Successful outputs validated against the advertised schemas. This tests one record per version, not all historical bundles. #8651 does not introduce direct-memory effects or claim complete access coverage.Composed trace and offline handoff
On #8651 head
c103de06f, real Ghidra stdio MCP for the x86-64 direct-read fixture returned theanalyze_functionscope limitation inline intrace_native_valuesin both profiles; the prior PR head retained the source dossier but omitted its limitations from the trace. The revised trace links that dossier. Exporting the trace and source, then importing them into a new target-free MCP session in each profile, preserved the trace record exactly and the source effects-view limitation. Bundle and target digests were unchanged and successful replies validated against advertised schemas. This is one trace on one host, not proof of general migration or memory-access completeness. A controlled snapshot regression checks that revision-1 value traces are not replayed as revision 2.Real snapshot replay boundary
On #8651 before its producer-profile change, a Ghidra snapshot created at baseline
ae8223ccreopened under the new workflow profile, but the new trace consumed an old cached function dossier and omitted the newLOAD/STOREscope. Following its synthesized source ID also encountered the separate #8282 source-ownership problem. Thus changing only the workflow profile did not establish fresh source semantics.At #8651 head
ecd7e86e, the Ghidra profile commitsvalue_flow_effect_scope: pcode-load-store-explicit-v1. Real compact and full MCP controls rejected the old snapshot withevidence_integrity_mismatch, imported its separately extracted historical Evidence bundle unchanged, and produced the qualified trace after opening the target without that snapshot. A snapshot saved under the new profile reopened and retained the scope. The old snapshot, extracted bundle and target digests remained unchanged. This is one snapshot and host; it does not establish general migration. The extraction was a local manual step, not a dedicated REA snapshot-export command.@morluto commented on GitHub (Oct 31, 2026):
Testing note: the existing real-Ghidra value-flow E2E in
scripts/lib/native-value-e2e.mjsvalidates argument, parameter-use and return bindings. Source inspection found nomemory_read/memory_writeor direct-memory-varnode assertion in that script. This does not imply the repository has no other memory tests; it explains why this particular higher-level verifier would not exercise the direct/indirect distinction. No test suite was run as part of that source review.@morluto commented on GitHub (Oct 31, 2026):
arm64 Mach-O and offline-view control
The same four source-authored access patterns reproduce on an independently built arm64 Mach-O dylib with REA
a989c0eand real Ghidra 12.1.4.llvm-objdumpshowsADRP+STRfor the direct global setter andADRP+LDRfor the getter. In the high-p-code dossier both direct accesses appear asCOPYinvolving the global at0x4000, andeffectsis empty; the pointer-parameterSTR/LDRappear asSTORE/LOADand havememory_write/memory_readeffects. The flows were not truncated, and the tests do not establish behavior for other access forms.A useful manual alternative is available on this fixture: Ghidra
xrefs(0x4000)found0x3acand0x3b8, andinspect_native_instructionclassified those exact sites as WRITE and READ. Kuna 1.986 through REA instead returned the preceding address-forming sites0x3a8and0x3b4; its instruction-inspection operation was unavailable, although its procedure assembly showed the followingSTR/LDR. Direct Kunaxrefs --fromlabelled the address-forming observations asdata, notreadorwrite. These are different observations and must not be automatically equated; see #8190.The TypeScript MCP SDK accepted advertised compact-profile output schemas for the successful summary/effect-view workflow. After Evidence export and import into a target-free server, both the empty direct-access effects view and the pointer-write effect view had exactly the same normalized results and Evidence IDs as live. This confirms retained projection, not that the effect list covers all machine memory accesses. Fixture SHA-256
4a86fb15551a497403c61dc6d4283851a32d0133887c2bac388598f5d6b91597and bundle hash were unchanged; the target was not executed.@morluto commented on GitHub (Oct 31, 2026):
Additional ARM64 Mach-O control on current REA
d54a4661da20382ad8456564a08569fdd24131c5/ Ghidra 12.1.4: an owned function performsldr w9,[x8], adds one,str w9,[x8], and returns the global's address. REA's instruction and function-reference tools report the correspondingREADandWRITEto0x100004000. The complete function dossier's high-p-code value flow is available and untruncated, buteffectsis empty: the global appears as a direct address input toINT_ADDand as the output ofCOPY, not asLOAD/STORE.trace_native_valuesretains those operations.The dossier also contains a later synthetic-looking global self-copy at the return, so counting every address varnode as a machine access would overstate the assembly. The operations are flagged
is_deadwhile also marked syntax-tree members; the existing limitation explicitly says to interpret those fields separately. This broadens the earlier x86-64 example to one ARM64 case and supports qualifying or carefully modeling direct-memory effects, not blindly turning p-code rows into runtime accesses. The target SHA-2569b1f167a30cd17cb5d4393d720336fc14d7ac3bce20ade06182b941ecf8918fdwas unchanged and the target was not executed.