mirror of
https://github.com/morluto/rea.git
synced 2026-11-30 08:08:55 +00:00
3a8a717b02edcd41b9dfbf64e82e5f7a761dfd8e
47
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3a8a717b02 |
feat(ghidra): set function signatures and define the types they use (#14859)
* feat(ghidra): set function signatures and define the types they use annotate_native_function accepts an optional C prototype, applied with USER_DEFINED source in the same transaction as the name and comments, verified by readback and rolled back with them on refusal. define_native_data_types stores caller-authored struct, union, enum and typedef definitions atomically under /rea_caller_defined and refuses existing names. inspect_native_data_type reports those types with source caller-defined, and annotation readback reports the applied prototype and its source. Refs #14831 * feat(ghidra): bound caller C text with launch controls and refuse unapplied constructs The lengths of a signature and of type declarations and the nesting depth of parentheses are launch-only REA_ controls with measured defaults, floors and maxima, written into the bridge's session descriptor. A refusal names the control, its effective value, source and range. The bridge tokenizes caller C before Ghidra's parser sees it and refuses what that parser accepts without applying: attributes, storage-class specifiers, variable declarations, directives other than #pragma pack, literals, function bodies, default arguments, unnamed enums and repeated member names. A type name that names different types is refused. When a function has no calling convention and the prototype names none, the compiler specification's default convention, which Ghidra already uses to assign the locked storage, is recorded, and annotation readback reports the convention. Refs #14831 * fix(ghidra): apply the signature bound to the caller's text The bridge appended the semicolon its parser needs before checking the length, so a prototype of exactly the admitted length was refused. The readback prototype is documented as reusable only when its function and type names are C identifiers. Refs #14831 * chore(mcp): refresh advertised schema summaries for Ghidra type edits Refs #14831 * fix(ghidra): bound caller C text per call and report dropped qualifiers Ghidra's C parser cannot be cancelled, so REA bounds the text it parses. The three launch-only environment controls left an agent that hit them with a restart as its only recovery. The two length bounds are now per-call parameters, signature_max_utf16 on annotate_native_function and declarations_max_utf16 on define_native_data_types, with the same defaults and measured maxima. A refusal reports details.limit with control_kind "parameter" and required_value, the text's length, so the generated recovery names the value to pass or asks for shorter text. The text fields no longer carry a schema maximum, so every over-length refusal is typed. Parenthesis nesting is a fixed ceiling of 8 levels, registered as a representation bound, because each level doubles parse time. The session descriptor no longer carries C parser limits, and the config module, environment entries and restart-only registry rows are removed. const and volatile are still applied without effect, because Ghidra's types have no representation for them. Both edits now return dropped_qualifiers with each qualifier's line and column, and for a signature its parameter index, null for the return type, instead of dropping them silently. * fix(ghidra): read caller C through one tokenizer and bound nesting per call The C admission scan tracked lines only at LF and read directives as raw lines matched by a regular expression, so a CR-only line break shifted dropped-qualifier positions and a trailing comment on #pragma pack was refused. One tokenizer now owns caller C positions, comments and literals: CR, LF and CRLF each end a line as in Ghidra's parser, and directives are admitted from its tokens, so comments read as whitespace there too. A block comment that would carry a directive onto another line is refused. Parenthesis nesting was a fixed ceiling justified by parse time, a resource limit. It is now the per-call parenthesis_max_depth (default 8, range 1..12) on both type-edit tools. The bridge measures the deepest nesting over the whole text and sends it, with a text's length, as the wire failure's required_value, so details.limit reports the bridge's own measurement instead of the adapter re-reading the request. The tokenizer also decides whether a prototype is terminated, so the parser sees the caller's text unchanged: no leading whitespace is stripped, and a trailing line comment no longer swallows the appended terminator. * fix(ghidra): parse caller C inside the edit's rollback and refuse parser diagnostics Ghidra's C parser writes the type database even with storeDataType false: a definition whose name matches an existing empty composite fills that type in place, in the parser's own nested transaction. Both type edits parsed before opening their transaction, so a refused definition, such as one conflicting with a DWARF placeholder, left that placeholder filled. Parsing, validation and storage now share the edit's one transaction, and parseCallerC refuses to run outside one. The parser also records diagnostics it cannot apply, such as a repeated enumerator it drops, and still reports success. Both edits now refuse any diagnostic with Ghidra's message, before anything is stored. The real-Ghidra verifier gains a phase with an ELF object whose DWARF declares an opaque struct, proving a refused definition leaves that empty composite unchanged, and refuses a repeated enumerator. * fix(ghidra): admit caller C from one audited table of tokens Ghidra drops Review kept finding one more construct Ghidra's C parser consumes without applying, because admission listed spellings piecemeal. The tokenizer now owns one table, audited against every token and production of Ghidra 12.2's C.jj and checked on Ghidra 12.2, in that grammar's own spellings: - Refused, because meaning is lost: __ptr32 and __ptr64 (stored as a native-width pointer), __near and __far, every attribute, declspec, __readableTo, alignas, packed and asm spelling, [[...]] attributes, storage and inline specifiers including __forceinline, __pragma and _Pragma, _Static_assert, Objective-C @ blocks (Ghidra skips their whole text), and backslashes. - Reported in dropped_qualifiers as pure qualifiers: every const and volatile spelling, restrict, __unaligned and __w64. #pragma pack is admitted only in the operand forms Ghidra applies as written with a decimal value; (0x1), (010), (show) and (pop, n) were ignored or read differently, and "# pragma" is a line marker Ghidra skips. An enum tag that neither the text nor the database defines made Ghidra invent an empty enum without a diagnostic; declarations now refuse it as they do an invented struct or union. Identifiers admit $, as C.jj's do, and the tokenizer reads numbers and [[ as single tokens. * fix(ghidra): bound caller type depth, admit only constant expressions Ghidra evaluates, refuse unmatched pack pops Recursion: the tokenizer's [[ lookahead re-entered next() for each "[", and the dependency walk recursed per pointer, array and member level. Both are iterative now. Ghidra 12.2's own data-type code recurses too: 1024 pointer or array levels resolve, 2048 exhaust the stack inside addDataType while its database lock is held, leaving the Program unable to save. Every parsed type's chain through pointers, arrays, typedefs and members, including existing database types, is now measured iteratively and refused beyond a fixed 256-level ceiling before Ghidra walks it. An unexpected StackOverflowError ends the session with a reason instead of being caught by the parser call, since Ghidra's lock may then be held. Constant expressions: Ghidra leaves names, casts, sizeof, floating and binary literals unevaluated and substitutes a default, so "MASK = FIRST << 4" was stored as 2, and it truncates values outside int. Enum values, array sizes and bit-field widths are admitted only as integer literals with arithmetic, shift, comparison, bitwise and logical operators, checked iteratively with C's rules to stay in int, including implicit enumerator values; anything else is refused at its position. Pragma pack: Ghidra ignores a bare (push), a pop with nothing pushed keeps the current packing, and a plain pop pops past labelled entries. The tokenizer tracks admitted pushes and admits a pop only when Ghidra's result matches C's. * fix(ghidra): admit constant expressions only as one literal, skip absent pointer targets, state the type-depth recovery truthfully Constant expressions: emulating C against Ghidra's own evaluator is an open-ended class of mismatches (comparisons, unsigned arithmetic such as ~0U >> 1 giving -1, names, casts, truncation). The evaluator is removed. Enum values, array sizes and bit-field widths are admitted only as one decimal or hex integer literal within int, optionally negated, without suffixes; anything else is refused at the first token that leaves that form, and the refusal says to write the computed value. Implicit enumerator values are still checked against int. Dependency walk: Ghidra's generic pointer has a null pointed-to type, and pushing it onto the ArrayDeque threw. Both the dependency and depth walks now take children from one cTypeChildren and skip an absent child. Type depth: the depth is measured over the whole chain before comparing it with the limit, so the refusal reports the depth it used, and it names the type from the parser's table rather than walking the type for a name. The recovery no longer suggests splitting into named types, which cannot help because depth counts through typedefs and existing types; it says only fewer nested levels do. * refactor(ghidra): refuse parentheses in definitions and keep parenthesis_max_depth on signatures only Under the literal-only rule for constant expressions, every parenthesis in a define_native_data_types text already ended in a refusal (function declarators, attributes, casts, sizeof, or a Ghidra diagnostic for a grouped declarator), so parenthesis_max_depth changed only which refusal a caller saw. A definition now refuses its first parenthesis at its position, and the parameter is removed from that tool's schema; it stays on annotate_native_function, whose prototype has a parameter list. * fix(ghidra): refuse distinct types that share one parser name Ghidra keeps struct tags, enum tags and typedefs in separate maps. Combining those maps dropped a typedef such as typedef int item when struct item was also defined, and the call still succeeded. Overlapping names are stored only when the definitions are equivalent, which keeps typedef struct s { ... } s as one struct. Any other overlap is refused with conflicting_type_definitions before the transaction stores anything. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): roll back a composite the parser fills in place Ghidra's parser replaces an empty composite during parsing and returns that same object. A later same-path check would store the fill as unchanged. Record those empty composites before parsing and refuse if parsing fills one, so the open transaction restores them. A different layout of a non-empty caller type still conflicts and leaves the stored type in place. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): close line comments at EOF and refuse overflowing pack values Ghidra's // skip token requires a line break, so a comment at the end of declarations or of an already-terminated signature was rejected. A newline is appended whenever the text ends in a line comment, before any semicolon added for an unterminated prototype. Integer.parseInt drops a pack operand outside a Java int and leaves the previous packing, so #pragma pack(2147483648) stored a natural layout. Decimal pack operands are admitted only when that parse succeeds. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ghidra): assert the empty-composite refusal by code and readback Defining a struct over the DWARF placeholder fills that empty composite during parsing, so the refusal is data_type_conflict before the old name-conflict message. The verifier checks that code and that the placeholder still has no fields. Co-authored-by: morluto <morluto@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
06fa8d0634 |
perf(ghidra): decompile upcoming export functions in parallel (#14847)
* fix(ghidra): reuse completed decompiles and decompile code outside functions * perf(ghidra): decompile upcoming export functions in parallel * fix(ghidra): say what the procedure inventory omits and how to reach it * fix(ghidra): say when a file offset maps to code outside every function A file-offset selector that mapped to disassembled code without a function failed with advice to choose an inventory procedure, which cannot name that code. The failure now states the fact and that procedure_pseudo_code can decompile it by the mapped analysis address. One predicate now decides that an address holds code outside every function for the address, file-offset and procedure_not_found paths, and the bridge imports UndefinedFunction and SoftReference like its other dependencies. * fix(ghidra): scope decompile read-ahead to the operation it prepares The bridge ran the read-ahead window in the generic serve loop, before the ping, analysis-incomplete and read-only checks and for any method that carried the field. It now runs only for procedure_pseudo_code, after those checks. The pool state sits with the other decompiler fields and its Ghidra types are imported. The export tests now cover consecutive windows, a limit that ends inside a window and a window whose first function sends no decompile request. The provider guide states that a function failing or timing out inside a window is attempted again by its own request, and how long the pool lives. * fix(ghidra): decompile code outside functions selected by file offset A file offset names the same location as its mapped analysis address, but an offset that mapped to code Ghidra disassembled without a function was refused while the address decompiled. The offset now resolves through the same on-the-fly UndefinedFunction path and limitation, and its selection reports the inferred entry as procedure_address. The refusal that sent the caller back to the address form is removed. * fix(ghidra): bound decompile read-ahead by the carrying request's deadline A request that carried a read-ahead window waited for every function in it, then decompiled its own function again when the window's attempt failed or timed out, so one configured deadline could elapse twice. That request now waits only within its own deadline, consumes the window's outcome for its function whatever it is, and cancels siblings still running once it has its result and the deadline has passed; they stay uncached for their own requests. The hint is advisory, so selectors past one window are now ignored instead of refusing the request. Pooled decompilers run on a private thread pool rather than resizing Ghidra's shared "Parallel Decompiler" pool, and are released after 30 seconds without a window. * test(ghidra): cover read-ahead deadline and hint clamp on real Ghidra The decompiler failure probe now injects a read-ahead window whose carrying function times out beside a sibling that never finishes. It checks that the request reports the timeout without decompiling again, waits only within its deadline, leaves the cancelled sibling uncached, uses REA's own thread pool, and that a longer hint is clamped to one window. The probe no longer ran against the current bridge: it used a removed three-argument Request constructor, expected the old timeout and failure wording, and injected decompilers that completed-result reuse never called. It now builds full requests, matches the current messages by prefix and clears reused results before each injection. * fix(ghidra): keep reused decompiles across reads without decompiler options A request that omits decompile_max_payload_mib now leaves the session's payload limit unchanged instead of resetting it to the Ghidra default, so an instruction or metadata read no longer discards completed decompiles. An explicit null still selects the installed default. Boundary limitations for a reused decompile of code outside every function now use the function the decompile widened, not a fresh entry-only UndefinedFunction. * docs(ghidra): state what an omitted decompiler payload option means * fix(decompile-all): plan read-ahead from the decision the export loop makes The read-ahead window decided which functions would be requested from journal history alone. A journaled write whose file was later deleted is requested again, and file problems spend the caller's limit, so a resume could prepare functions outside its limit while the ones it requested got no preparation. Each function is now decided once by the same check the loop uses. The window keeps those decisions for the loop, counts every attempt against the limit, and names only functions that will be decompiled. * test(ghidra): cover payload-option omission and reused undefined-function bodies * fix(decompile-all): start each read-ahead hint at the function that sends it A function the window named first could send no decompile request, for example when procedure_info classifies it as external, so the next request sent a hint headed by that function. A provider reads the head as the carrying request's own function, so the bridge could not keep that request's window result and might decompile it again. The request now takes the planned window from its own function on. |
||
|
|
1aa301e149 |
fix(ghidra): cancel an active request without closing the session (#14857)
* fix(ghidra): cancel an active request without closing the session Cancelling the request Ghidra is working on closed the whole session, so the next call paid for a restore or a full re-import and session annotations were lost. The bridge now reads its connection on a second thread that only cancels the Ghidra TaskMonitor of the request a cancel frame names; requests still run one at a time. For an active read, REA writes that frame and waits up to two seconds for the request's reply. When it arrives, the call returns a cancellation and the session, its annotations and the queued requests stay. Edits are not interrupted, and a read that is not answered in time closes the session as before. Refs #14832, #8223, #5340 * feat(ghidra): bound the cancel grace with a launch control REA_GHIDRA_CANCEL_GRACE_MS replaces the fixed 2 s wait for the bridge to answer a cancelled read before the session is closed. Default 2000 ms, floor 100 ms, maximum 60000 ms. The value is parsed when REA starts and fixed for a session when its request queue is constructed. It is a restart-only launch control in the numeric limit registry, not a runtime analysis setting, so the MCP tool catalog is unchanged. The session limitation states the applied value and its source, and the failure of requests queued behind an expired grace names the control, value, source and range. An invalid value is reported by doctor and registration validation and refuses a Ghidra session. The hang_tools client cases inject the 100 ms floor instead of waiting out the default grace. * fix(ghidra): keep capability limitations from claiming the default cancel grace Capability descriptors are built once without a session, so they stated the 2000 ms default as the applied value even when REA_GHIDRA_CANCEL_GRACE_MS was set at launch. They now name the control and its default; session limitations still state the value applied. * refactor(ghidra): drop the redundant pre-decompile cancellation check DecompInterface.decompileFunction already returns a DISPOSED_ON_CANCEL result for a monitor cancelled before it starts, which the existing isCancelled() check reports as decompile_cancelled. * test(ghidra): expect session limitations from the session owner in MCP parity The parity check compared session Evidence with capability limitations. Since capability descriptors no longer state an applied cancel grace, the expectation is derived from ghidraSessionCommonLimitations with the grace this harness applies. |
||
|
|
a3a491c389 |
fix(ghidra): reuse completed decompiles and decompile code outside functions (#14843)
* fix(ghidra): reuse completed decompiles and decompile code outside functions * fix(ghidra): say what the procedure inventory omits and how to reach it * fix(ghidra): say when a file offset maps to code outside every function A file-offset selector that mapped to disassembled code without a function failed with advice to choose an inventory procedure, which cannot name that code. The failure now states the fact and that procedure_pseudo_code can decompile it by the mapped analysis address. One predicate now decides that an address holds code outside every function for the address, file-offset and procedure_not_found paths, and the bridge imports UndefinedFunction and SoftReference like its other dependencies. * fix(ghidra): decompile code outside functions selected by file offset A file offset names the same location as its mapped analysis address, but an offset that mapped to code Ghidra disassembled without a function was refused while the address decompiled. The offset now resolves through the same on-the-fly UndefinedFunction path and limitation, and its selection reports the inferred entry as procedure_address. The refusal that sent the caller back to the address form is removed. * fix(ghidra): keep reused decompiles across reads without decompiler options A request that omits decompile_max_payload_mib now leaves the session's payload limit unchanged instead of resetting it to the Ghidra default, so an instruction or metadata read no longer discards completed decompiles. An explicit null still selects the installed default. Boundary limitations for a reused decompile of code outside every function now use the function the decompile widened, not a fresh entry-only UndefinedFunction. * docs(ghidra): state what an omitted decompiler payload option means |
||
|
|
d8aadcc69b |
feat(ghidra): admit RISC-V ilp32f ELF with a derived calling convention (#8401)
* feat(ghidra): record the RISC-V float-ABI calling-convention decision Decision D3 (#7477), provisional: admit ELF32 soft-float (ilp32) RISC-V images through a lane that keeps the pinned RISCV:LE:32:default language and corrects the calling convention in the bridge. This commit is the contract only; admission is unchanged. - The domain owns the e_flags float-ABI vocabulary and parses .riscv.attributes and Tag_RISCV_arch into a declared, absent or unavailable ISA declaration. - The Ghidra profile owns the lane table (class and float ABI), lane ids built from fields, the ilp32-prototype-v1 policy and its __rea_ilp32 prototype, and the extensions Ghidra 12.1.4 decodes with p-code. - The session handshake accepts the bridge's calling-convention report. - docs/ghidra-riscv.md keeps the decision record and per-ABI policies for ilp32 and ilp32f; a test keeps it in step with the tables. - tests/conformance/c/riscv-float-abi.c is the source the policies were measured on. * feat(ghidra): admit RISC-V ilp32 ELF with a derived calling convention ESP32-C2, C3, C5, C6, C61, H2 and H21 builds are ELF32 soft-float (ilp32) images, which the RISC-V lane refused at its double-float check. Ghidra 12.1.4's generic RV32 compiler specification models ilp32d, so its stock prototype would read float and double arguments from fa0-fa7. - Target resolution reads the one SHT_RISCV_ATTRIBUTES section through the same bounded ELF declaration reader as range validation, and records Tag_RISCV_arch as declared, absent or unavailable. - Admission selects a lane from the class and float-ABI table. The soft-float lane also requires an RV32I Tag_RISCV_arch that declares only extensions Ghidra decodes with p-code; the refusal names any others (Zcb, Zcmp, Zcmt, Zb*, xesp*). - Soft-float profiles commit float_abi, arch, riscv_calling_convention ilp32-prototype-v1 and the lane elf32-exec-le-soft-float-generic-v1. Double-float profiles are unchanged. - ReaGhidraRiscvCallingConvention.java runs after analysis. It derives __rea_ilp32 from the default prototype without floating-point entries and rules, with fs0-fs11 killed by calls, self-checks its storage and assigns it to every non-thunk function, external function and function definition. Its report is written last. - The provider client requires that report exactly when the profile commits the policy, before any operation, and keeps it as session limitations and caller-project history. ELF32 single-float (ilp32f), quad-float and ELF64 soft- or single-float images stay refused, now with a reason built from the lane table. * test(ghidra): verify RISC-V ilp32 against real Ghidra verify:ghidra:riscv now also builds tests/conformance/c/riscv-float-abi.c with ESP32-C3's -march=rv32imc_zicsr_zifencei -mabi=ilp32, typed with DWARF and linked again with --strip-all. Every allocated section of the stripped image must keep its address and bytes. - riscv-checks.mjs holds the ilp32 storage of each fixture function together with the words the compiler's call site writes there. An LLVM objdump reading of the caller must find every word at its stated location: an unaligned named double, the a7/stack split, two floats in an integer pair, a large structure by reference, aligned variadic pairs and an indirect call. - Through CLI and stdio MCP, the soft-float builds must report the soft-float lane and ilp32-prototype-v1, __rea_ilp32 with exactly that storage (one integer word per location when stripped), caller pseudocode that passes the source constants and names no floating-point register, the prototype outcome in retained Evidence, and decoded fence.i and csrr. - The RV32 double-float image relabelled as soft-float, refused before, is admitted through the new lane. RV64 soft-float, single-float and unsupported bits are refused with their reasons. - riscv-checks.test.ts runs the checks offline against recorded LLVM and Ghidra output, including Ghidra's stock ilp32d prototypes as a negative control. * fix(ghidra): pass RISC-V ilp32 values over 8 bytes by reference The psABI passes any value wider than 2 x XLEN by reference, scalars included. __rea_ilp32 converted only structures and unions over 8 bytes to pointers, so a long double (16 bytes) was joined into a1-a4. Measured on Ghidra 12.1.4, rea_riscv_abi_quad(long double value, int sel) read value from a4:4,a3:4,a2:4,a1:4 and sel from a5, where clang passes a pointer in a1 and sel in a2. - ReaGhidraRiscvCallingConvention.java now has one derivation driven by a per-policy row (floating-point entry size, preserved floating-point registers). Every policy inserts a rule before the input list's final join that converts any value of 9 bytes or more to a pointer; a return that size already becomes a caller buffer. The self-check requires a 16-byte value to pass by reference. - The fixture gains rea_riscv_abi_quad. The call-site oracle now checks the words the by-reference pointers point at, for the large structure and the long double, and the recorded data comes from an LLVM 19 build. - docs/ghidra-riscv.md: the decision record and the ilp32 policy row. ilp32-prototype-v1 keeps its id: no release carries it yet. * feat(ghidra): record the RISC-V ilp32f calling-convention decision Decision D3 (#7477), provisional, gains its ilp32f row: ELF32 images that declare the single-float ABI are admitted through the lane elf32-exec-le-single-float-generic-v1 with policy ilp32f-prototype-v1 and the __rea_ilp32f prototype, keeping the pinned RISCV:LE:32:default language. - The lane table gains the row, and admission requires the F extension in Tag_RISCV_arch beside the decoded-extension check. - docs/ghidra-riscv.md records how the one-float-one-integer rule is realised: the shared derivation's row limits float entries to 4 bytes, keeps fs0-fs11 preserved and adds Ghidra 12.1.4's join_dual_class with fillalternate for structures of up to 8 bytes. The prototype is the only thing that assigns storage: a check of every typed function and function-pointer type against the psABI refuses the image when one uses a shape the prototype misplaces (a float with two shorts, a pointer or a union, _Float16, packed or over-aligned float structures). float _Complex, which Ghidra imports as a qword, stays unmodelled. Custom storage for typed functions and an unverified-signature admission are recorded alternatives. - The session report for ilp32f can carry the bridge's refusal instead of the outcome; the handshake turns it into the user-facing reason. - tests/conformance/c/riscv-float-abi.c gains single-float-only shapes and a refused variant; the ilp32 build's code is unchanged. Until the bridge implements the policy (next commit), its post-analysis script rejects the new policy id and REA refuses ilp32f sessions. * feat(ghidra): apply the RISC-V ilp32f calling convention in the bridge ReaGhidraRiscvCallingConvention.java gains ilp32f-prototype-v1 as a row of its one derivation: float entries limited to 4 bytes, fs0-fs11 preserved, and structures that Ghidra's dual-class join splits between register files. The ilp32 row and its checks are unchanged. - For that row the derivation inserts, before the input and output lists' final join, a rule giving structures of up to 8 bytes join_dual_class with fillalternate. The shared rule still passes values of 9 bytes or more by reference. - The self-check also pins the storage of a float, double, two-float and float-and-int signature, and requires fs0-fs11 preserved. - After assigning the prototype to every function and function definition, the script compares the storage class it gives each signature type, as a first argument or return, with the psABI's from the flattened fields. It checks every typed function and every definition a pointer type refers to. When any signature uses a shape the prototype misplaces, the report carries a refusal naming up to eight signatures instead of the outcome, and REA refuses the session with that reason. The launcher test covers both policy ids. * test(ghidra): verify RISC-V ilp32f against real Ghidra verify:ghidra:riscv now also builds tests/conformance/c/riscv-float-abi.c with ESP32-H4's -march=rv32imafc_zicsr_zifencei -mabi=ilp32f, typed with DWARF and linked again with --strip-all, and a typed build with REA_RISCV_ABI_UNMODELLED that the bridge must refuse. - riscv-checks.mjs holds per-ABI tables: the ilp32 and ilp32f storage of each fixture function with the words its caller's call site writes there (and, for by-reference values, the words the pointer points at), the callers, and the indirect calls. Stripped builds record where Ghidra's inference differs from one word per typed location. - The objdump call-site oracle now follows fa registers (flw, fsw, fmv.w.x) and tracks stack memory per byte, so word loads see byte and halfword stores, across both callers. - Through CLI and stdio MCP the single-float builds must report the lane, ilp32f-prototype-v1 and __rea_ilp32f with the table's storage, including float-and-integer structures both ways round, float registers running out, long double by reference and an indirect float-and-integer call. - riscv-isa-probe.S adds fmv.w.x and fmv.x.w when the build has F. - The unmodelled build opens, then its first analysis call over MCP and the CLI fails with the bridge's reason naming its three signatures: a function passing a three-field structure, a _Float16 function and a function-pointer type passing the three-field structure. - Header mutations: RV32 double-float relabelled single-float is admitted; the soft-float image relabelled single-float lacks F and is refused; RV64 lp64f and high bits are refused. * test(ghidra): check RISC-V lane limitations by their facts The limitation tests froze a full explanatory sentence, the note count and array positions, so a harmless rewording failed them: the pattern Greptile flagged on #7486. Assert the facts the notes must carry instead: the pinned language, the static-linkage boundary, one note naming the declared ABI, the ABI the pinned language models and the prototype REA applies, and the declared ISA. * test(ghidra): check the ilp32f limitations by their facts Like the ilp32 tests, the ilp32f test froze its explanatory sentence, the note count and array positions. Assert one note naming the declared ilp32f ABI, the modelled ilp32d and the applied `__rea_ilp32f` prototype, and the declared ISA. * test(ghidra): check return storage in stripped RISC-V ilp32 builds The stripped branch of assertRiscvIlp32Storage compared parameter storage only, so an inferred return that lost the high word of a register pair, such as rea_riscv_abi_wide at a0:4 instead of a1:4,a0:4, still passed. Stripped returns must now use the typed build's storage, or none when the result goes through caller memory. Recovered type names are still not compared: a test accepts other type names and refuses the dropped high word. * docs(ghidra): record decision D3 as decided in #7477 * fix(ghidra): flatten RISC-V arrays and bit-fields as the psABI does The ilp32f signature check flattened a by-value type differently from GCC and Clang in two shapes. A nonzero array of empty C++ classes added no fields, so struct { E e[1]; char c; float f; } looked like a char and a float, and the policy admitted a float-and-integer split for a value both compilers pass in two integer registers. A bit-field was bounded by its declared type, so a float beside unsigned long long b : 1 used the integer convention, and the image was refused although __rea_ilp32f places it as the compilers do. An array element with no fields now makes the array use the integer convention, and a bit-field counts by its width. Arrays are also classified once per element type, so an array of empty structures no longer costs one visit per element, and a refusal keeps its counts and at most eight shortened examples instead of every description. The unmodelled build gains a C++ source with the empty-class array, which the refusal must name, and a bit-field function it must not. * fix(ghidra): refuse flexible array members in ilp32f signatures A float beside a flexible array member flattened to a single float, so the policy admitted fa0 for a value Clang passes in a0. Ghidra imports the member as a trailing array without elements, which the walk skipped as a zero-length member. A trailing array without elements now makes the value use the integer convention. Ghidra imports a trailing [0] the same way, and Clang passes that in fa0, so such a structure fails closed too. The unmodelled build gains a flexible-array function the refusal must name. * docs(ghidra): state that hidden-reference C++ classes are not modelled Compilers pass a C++ class with a non-trivial copy constructor or destructor through a hidden pointer, but Ghidra 12.1.4 keeps only its fields, and GCC 14.2 writes no DW_AT_calling_convention, so the ilp32f check cannot detect such a signature. Sessions now state this as a limitation, and the guide lists it as not modelled. * fix(ghidra): refuse ilp32f shapes and D hardware the prototype misplaces A flexible array that starts inside a structure's padding passed the offset check, so its float took fa0 where GCC and Clang use a0. The position among the members now decides. A bare array in a signature can only be a GNU vector, which uses the integer convention, so the policy stops flattening it. With D the ABI preserves only the low 32 bits of fs0-fs11 and Ghidra's model preserves all 64, so the lane refuses d and zcd. Ghidra's import erases float _Complex, a vector inside a structure and _Atomic, so ilp32f sessions now state those limits. * fix(ghidra): refuse ilp32f values Ghidra left untyped Ghidra's DWARF import gives an encoding it does not map an untyped byte, word, dword or qword, so float _Complex, which takes two float registers, showed as an integer in a0 and a1. The policy cannot know such a value's class, so it now refuses any value of up to 8 bytes that holds one, alone or inside a structure. The session limitation no longer lists complex values. * docs(ghidra): match the RISC-V verification notes to the lane * fix(ghidra): refuse padded untyped RISC-V values An over-aligned structure of one float _Complex is 16 bytes, so the 8-byte guard let it fall through to a reference, although GCC and Clang pass it in fa0 and fa1. Decide on the bytes the fields hold, which is what the float convention limits, not on the padded length. * fix(ghidra): walk each RISC-V field type once The held-bytes and untyped checks revisited a nested type for every member, so a chain of structures that each hold two of the last one cost about 2^29 calls before any size check. One cached walk now answers both, once per type. * fix(ghidra): refuse ilp32f values whose bytes may hide a bit-field DWARF omits unnamed bit-fields of nonzero width, which the psABI counts: Clang 19 passes struct { float f; unsigned : 1; } in fa0 and a0, and a following int in a1, while Ghidra sees one float in 8 bytes. A value with a float whose structure has bytes that no member and no natural alignment padding explain now has an unknown class, so the policy refuses the image. Over-aligned structures of up to 8 bytes are refused too. verify:ghidra:riscv's unmodelled build passes such a structure. * perf(ghidra): cache the ilp32f layout checks per type, document padding unexplainedBytes and naturalAlignment recomputed nested types on every chain, so a deeper nesting cost quadratically more. Both now keep one result per stripped DataType, as held() does. The guide now states that an unnamed bit-field in natural padding, as in struct { char c; unsigned : 1; float f; }, leaves no DWARF trace: Clang 19 passes it in a0 and a1 but the lane admits it with the float in fa0. Refusing every padded float value would also refuse common layouts. * fix(ghidra): refuse ilp32f union parameters that may be transparent A transparent union passes as its first member, but DWARF does not record the attribute: Clang 19 passes union { struct { float f; } s; unsigned u; } with transparent_union in fa0, while Ghidra and the psABI class see an ordinary union in a0, so the lane admitted wrong storage. A union parameter whose first member would take a float register now refuses the policy, unless Clang would ignore the attribute: a floating-point first member, or another member of a different size or alignment. Returns are unaffected. verify:ghidra:riscv's unmodelled build passes one such union and three ordinary ones. * fix(ghidra): refuse ilp32f float parameters of old-style C definitions Callers of an old-style (K&R) definition such as float f(x) float x; promote the argument to double: Clang 19 passes it in integer registers and narrows it with __truncdfsf2. DWARF still declares a float and only omits DW_AT_prototyped, which Ghidra 12.1.4's DWARF import drops, so the lane placed it in fa0. When a typed signature has a float parameter, the script now reads DWARF again for C subprograms without DW_AT_prototyped and refuses the policy for their float parameters. C++ and other languages never mark the attribute and are not checked. verify:ghidra:riscv's unmodelled build passes one such definition. * fix(ghidra): admit a direct C++ empty-class member in an ilp32f structure Ghidra imports a C++ empty class as a one-byte structure without components, so the unexplained-bytes check counted its byte as an omitted field. A structure such as `struct S { E e; char c; float f; }` was then UNKNOWN and refused the whole ilp32f image, although GCC 14.2 (ESP-IDF) and Clang 21.1.8 ignore the member when flattening and pass S in a0 and fa0, the storage the derived float-and-integer rule gives it. The check now treats a one-byte structure without components as that storage. A nonzero array of empty classes still uses the integer convention and stays refused. The unmodelled fixture gains rea_riscv_abi_member, which the real-Ghidra verifier requires to be admitted, and the guide names the shape. * fix(ghidra): refuse RISC-V functions compiled from a language without the C psABI Both RISC-V calling-convention policies apply a C psABI prototype to every function, so code from a language with another calling convention, such as Rust's default ABI, was silently given the wrong storage. Before either policy installs its prototype, the bridge now reads the image's DWARF once and refuses the image when a compile unit outside C, C++ and assembly, or one without DW_AT_language, defines a function with code, naming each language. The same pass collects the old-style C definitions the ilp32f check needs, which were read lazily before. This also changes main's ilp32 policy, which had no refusal path. Code that no DWARF compile unit describes cannot be checked, and every session that applies a policy now states that limitation. * test(verify): refuse RISC-V fixtures whose C compile units are labelled Rust The real RISC-V lane rewrites the DW_AT_language of each C compile unit in the typed soft- and single-float builds to Rust, with a bounds-checked reader of the units' abbreviations, and checks that each policy refuses the image and names the language. The unlabelled builds are the controls. * fix(ghidra): refuse ilp32f values whose register fields do not start their parts The psABI puts each flattened field of a structure passed in float registers at bit 0 of its own register, while __rea_ilp32f's dual-class join gives each register a 4-byte part of the value as laid out in memory. Both agree only when every such field starts its part. A C++ empty member keeps its byte although the psABI ignores it as a field, so the char of struct { E e; char c; float f; } passes in bits 0-7 of a0 while the prototype reads bits 8-15; the policy compared only storage classes, which match, and admitted it. Flattening now records each field's bit position, and a value whose float-register fields do not each start their own part is refused, which also covers packed layouts and bit-fields above bit 0. The unmodelled fixture's caller now shows where the compiler puts that char. * docs(ghidra): keep RISC-V guide focused on ABI rules and compatibility --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
0b51ca03de |
feat(ghidra): open M-profile raw images at a separate load base (#7951)
* test(raw): pin raw-binary admission and identity Record what raw-binary loads produce today, so a later change to how the load is represented has to keep it: - every admission result and pairing message over a grid of architectures, entry spellings and file sizes; - the analysis profile digest for each raw family; - the snapshot target and query identity of a raw ARM load; - the complete raw-binary load image for the ARM fixture. The values were computed at |
||
|
|
5e56bd0a23 |
fix(ghidra)!: load ESP-IDF flash code in Ghidra's default address space (#8464)
* fix(ghidra)!: load ESP-IDF flash code in Ghidra's default address space ESP-IDF's linker script reserves the addresses of .flash.text with the NOBITS section .flash_rodata_dummy. Ghidra 12.1.4's ELF loader gives the default address space to the later section, so .flash.text lands in an overlay that its DWARF import, call-frame processing and default-space references do not reach. Flash functions lose their DWARF signatures, locals and no-return flags, each gets a one-byte shadow function in the reservation, and pseudocode runs past calls such as esp_restart(). The ELF reader now records allocated ranges that an executable section shares with another section, through one section-table visitor that the RISC-V ISA reader also uses. When a NOBITS section starts with one executable section and covers it, the RISC-V lanes commit both sections to the analysis profile. ReaGhidraPrepareElfLoad.java then gives the code the default address space before auto-analysis and keeps the reservation as an uninitialized overlay; bytes, file offsets, symbols, functions and entry points are kept. The session reports the outcome, and any memory map that differs from the committed plan is refused. Images without such an overlap keep their analysis profiles byte for byte. BREAKING CHANGE: RISC-V images with this layout, such as ESP-IDF ESP32-C6, H2 and H21 builds, report flash code at its ELF address (0x42...) instead of .flash.text:0x42..., and their analysis profiles change. RISC-V images with any other section overlap that involves executable code are now refused with the overlapping sections named. These include ESP-IDF v5.5.2 ESP32-C5 and C61 builds, whose second reservation, .ext_ram.dummy, also covers .flash.text. See docs/ghidra-riscv.md. * fix(ghidra): bound the overlap sweep and check the load preparation Domain: - Find section overlaps with one sort and sweep that stops at the second overlap involving executable code, and read the ISA and the overlap in one section-table pass. - Record the two sections that cause a refusal as witnesses. The Ghidra lane owns the refusal text and names them with their ranges. Ghidra lane: - Check the preparation report before the first lazily started analysis call, as for the calling-convention report. - The pre-analysis script removes the code's overlay entry points, checks that no symbol or reference remains in the old overlay range, and reports the counts of the result. Its report echoes the blocks it left, which the client compares with the committed sections. A failed move refuses and rethrows. Reservation labels mark no entry points. - Session limitations no longer state a planned move after a canonical outcome. Verification: - The ESP fixture defines ESP-IDF's absolute text bounds and the reservation's label. The lane checks their addresses, the entry points, file-offset uniqueness and snapshot replay, a reservation-first build, a pre-analysis refusal through analyzeHeadless and a truncated double-float section table. - Boundary tests cover the refusal witnesses, a 10,000-section table and an ELF64 table. * fix(ghidra): retarget references into the moved ESP-IDF flash code The move takes the references from the code's range but not the references into it. Besides the entry points, Ghidra 12.1.4's loader records one data reference from the .flash.text section header to the code, which the new post-condition refused in the RISC-V lane. Retarget plain memory references and entry points into the old range to the moved code; any other kind stays behind and is refused. Removing the reservation block keeps the references into its range, so the pinned symbols' entry points need no re-add. * fix(ghidra): move labels past the ESP-IDF flash code's end with it Ghidra 12.1.4 places a section-relative symbol at the section's end, such as ESP-IDF's _etext, in the code's overlay space one byte past the block. The move covers the block only, so the label stayed in the overlay and ended up in the reservation. Everything in the code's overlay space now follows the code: references are retargeted, labels outside the block are created again in the default space, and the post-condition checks the whole space. The script refuses when another block shares that space. The ESP fixture defines _etext, and the lane checks its address. * fix(ghidra): check prepared blocks by coordinates and address spaces The client compared the pre-script's echoed block names with the ELF section names, although section names are display only: an unnamed section's empty name never matches the name Ghidra gives its block, so that preparation was refused. It also accepted any reported address spaces. The check now compares addresses, sizes and the code's file offset, and requires moved code to go from an overlay into the program's default space while its reservation leaves it, and canonical code to stay there. An unnamed section is labelled by its index. The docs and the pre-script now state that a failure during the move may be refused without its reason, and that an entry mark on a reservation label stays at its default-space address. The docs give the llvm-objcopy route for the refused C5 and C61 builds. The lane checks that no other block maps any of the code's file bytes, and the overlap tests add the C5 and C61 section shape. * fix(ghidra): bound the sections the overlap check keeps The overlap check kept one record per allocated, non-empty section, and only the file size limited their number. NOBITS headers take no file bytes, so a crafted 1 GB ELF32 table holds about 27 million of them. The check now keeps at most 65,280 (SHN_LORESERVE, from which ELF counts sections through section zero) and reports the overlap as unavailable beyond that, which the RISC-V lanes refuse as they refuse a table that cannot be read. * fix(ghidra): check RISC-V handshake reports before any analysis call A RISC-V session that committed neither a calling-convention policy nor a load preparation started its bridge lazily on the first query other than `health`. An `elf_load_preparation` or calling-convention report that the profile did not commit was then never checked, and the query returned its result. Every RISC-V session now starts through the checked handshake, so such a report closes the session before any analysis call, whatever the first query is. A double-float session that reports a preparation, and one that reports a calling-convention policy, are now tested with `list_procedures`; both fail without the fix. Admission, profile parameters and profile digests do not change. If Ghidra exits during the first query of a double-float session, the error now tells the caller to reopen the session, as other checked sessions do. * fix(ghidra): skip analysis after a refused ELF load preparation A refused memory map only wrote the refusal, so headless Ghidra still ran seeds, auto-analysis and post-script analysis on a program that REA then discarded. The preparation now turns off headless auto-analysis when it refuses; later pre-scripts and the bridge still run, so the session reports the reason. The swap also renamed the reservation's overlay space to the section's raw name, so a reservation named like another address space, such as the RISC-V default space ram, or containing characters Ghidra rejects, failed after the move. The space now takes the name Ghidra's memory map derives for an overlay block: ':' and whitespace become '_', and a name in use gains .1, .2 and so on. verify:ghidra:riscv drops -noanalysis from the refusal run and checks that Ghidra analyzed nothing, and a seventh fixture names the reservation ram and checks that it moves into the overlay space ram.1. * test(ghidra): read the load preparation report before Ghidra's log suffix * test(ghidra): pin unchanged RISC-V profiles at main's revisions main's byte-search (#8840), data-type (#8602) and reference revisions change every Ghidra profile. With those revisions reversed, the old pins hold. * fix(ghidra): name the moved RISC-V guide in load-layout diagnostics The overlap refusal, the load-layout limitation and the bridge comments named docs/ghidra-riscv.md, which main moved to docs/providers/. * test(ghidra): check load-preparation facts instead of sentences The refusal, report-check and handshake tests compared whole messages. They now check the sections, coordinates, spaces and counts each message must state, and the handshake compares the session's limitations with ghidraRiscvLoadPreparationLimitations. Rewording the messages passes; dropping a count fails. * fix(ghidra): give the ESP-IDF load preparation unused temporary names The preparation created its temporary blocks as <name>.rea, so a disjoint section already named that refused an otherwise admitted image. It now takes the first unused <name>.rea[.N]. verify:ghidra:riscv gains an esp-edge-names fixture with such a section. * fix(ghidra): keep both final block names free during the ESP-IDF swap The code's temporary block could take the removed reservation's name, such as a reservation named <code>.rea, and the reservation's rename back then collided. The picker now skips both final names. verify:ghidra:riscv's esp-edge-names fixture names its reservation .flash.text.rea beside a disjoint .flash.text.rea.1. * test(ghidra): repin the overlap-free RISC-V digests for main's #8340 main's #8340 bumps call_relationship_coverage from v5 to v7, which changes every Ghidra profile digest. With the revision reverted in place, the old pins hold (79 of 79). * test(ghidra): repin unchanged RISC-V digests for main's value-flow budgets main's #9706 adds native_value_flow_projection to the shared analysis semantics, which changes the profiles of images without a section overlap. With that one revision removed, the previous pins hold (79 of 79). * fix(ghidra): inspect RISC-V PIE section overlaps and refuse an unverified PIE reservation Main admits RISC-V PIE, but this lane requires a section-overlap read that the resolver made only for ET_EXEC, so every PIE was refused. A PIE's section addresses are fixed offsets from its load base, so overlaps do not depend on the base: read them for ET_DYN too. The NOBITS reservation preparation is verified for ET_EXEC only, so a PIE that needs it is refused. Main's producer identity now digests the bridge sources, so the test that compared profile digests with main's is replaced by checking that images without an overlap commit no load preparation. * fix(ghidra): find an ESP-IDF reservation that Ghidra 12.2 marks executable Ghidra 12.2 gives each section block the permissions of the first PT_LOAD that contains its address, so a NOBITS reservation that shares the code's addresses comes out executable and the preparation refused every ESP-IDF image. Tell the reservation from the code by its missing bytes alone; the displaced reservation is still made non-executable. The PIE refusal test now uses the ELF64 lane, which admits PIE. * fix(verify): read the ESP-IDF fixtures' identity where main's #11416 moved it Evidence subjects and snapshot targets now carry their digest under identity, as the rest of the RISC-V verifier reads it. * docs(ghidra): describe the ESP-IDF load layout as verified on Ghidra 12.2 The real RISC-V lane now passes on Ghidra 12.2, whose ELF loader still puts the code in an overlay when its reservation follows it. Name 12.2 where the lane exercised that behaviour, and note that 12.2 can mark the reservation executable. Measurements of Ghidra APIs the lane did not re-check keep their 12.1.4 attribution. * docs(domain): align RISC-V section-overlap JSDoc with ET_DYN inspection --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
fe4e466ef9 |
fix(ghidra): admit recordless legacy MIPS32 carves missing section tables (#4532)
* fix(ghidra): admit recordless legacy MIPS32 carves missing section tables A carved firmware image keeps its original section header table offset while the captured file ends before it. The recordless legacy admission required a limitation-free inspection, so these files were refused even though every program header — the only required declaration table — had been examined and none declares PT_MIPS_ABIFLAGS. Admit the recordless shape when every recorded limitation is the section-table truncation itself, keep that limitation in the profile and Evidence beside the o32 assumption, and still refuse any other limitation. The truncation wording now lives beside its producer as an exported prefix so admission cannot drift from the recorded fact. Fixes #3155 * docs(ghidra): describe the recordless carve admission in the MIPS guide The guide still said a carved recordless ELF whose section table extends past the captured bytes is refused. State the new exception, the limitation it keeps in the profile and Evidence, and that any other or mixed limitation still refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(elf): validate captured section headers in truncated MIPS tables --------- Co-authored-by: akushonkamen <akushonkamen@163.com> Co-authored-by: Jonathan Henson <jonathanwhenson@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
fc795dd260 |
fix(pwntools)!: report a per-call input ceiling as its producer_limits parameter (#14208)
* docs: correct, re-verify and prune getting-started, provider and reference pages Re-verify the macOS arm64 native decompiler build, the m68k lane and the RISC-V lane on Ghidra 12.2, check RISC-V language facts against the 12.2 SLEIGH sources, document the verify:ghidra demangler prerequisite, remove duplicated IDA and mcp add paragraphs, prune release-history narratives and the stale 6.4.0 registry checkpoint, clarify Godot carrier classification, correct the packet-summary and SQLite host rows, and say in the inspect-binary-layout CLI description that it is ELF-only on Linux x64. * docs(reference): add a canonical producer_limits section Derive the accepted fields and defaults per operation from the producer limit schemas and describe how an exhausted budget reports its per-call control. * docs(reference): split producer_limits defaults by operation and document the pwntools exceptions Field and decoder discovery reject input_bytes, and packet field search defaults output_bytes to 32 MiB. For pwntools, diagnostic_bytes bounds combined stdout and stderr while output_bytes bounds the reply file, and an oversized input reports the pwntools.max_input_bytes setting limit rather than the producer_limits parameter shape. * fix(pwntools)!: report a per-call input ceiling as its producer_limits parameter When producer_limits.input_bytes set the pwntools admission ceiling for a call, an oversized input reported the registered pwntools.max_input_bytes setting limit with update_mode "parameter" attached. Every other producer budget reports the parameter shape, and AGENTS.md asks for the limit of the control that stopped the work. Report producer_limits.input_bytes with applies_at "next_call" and, as its default, the ceiling that applies when the field is omitted. Setting, launch and built-in ceilings keep the setting shape. Remove the reference exception this made obsolete. BREAKING CHANGE: for a request-sourced pwntools input ceiling, details.limit is now a control_kind "parameter" limit instead of a setting limit carrying setting, source, update_mode and scope fields. |
||
|
|
522452da70 |
perf(ida): bootstrap Hex-Rays bridge once, push down string_at and list_funcs filter, and cache imports (#13469)
* perf(ida): bootstrap Hex-Rays bridge once, push down string_at and list_funcs filter, and cache imports (#13276, #13353) * fix(ida): reload the Python bridge only when its entry point is missing |
||
|
|
6b7b09f008 |
docs(ida): name the database supervisor's deadlines for long analyses
A long headless analysis is bounded by ida-pro-mcp's own IDA_MCP_OPEN_TIMEOUT, IDA_MCP_WEDGED_GRACE_SEC and IDA_MCP_WORKER_CALL_TIMEOUT as well as REA's timeoutMs. Name them, their defaults in the documented c133c385 snapshot, and where they are set. Refs #13286 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
6822ebe1f3 |
feat(ida): support the official Hex-Rays IDA MCP headlessly (#4813)
* feat(ida): support the official Hex-Rays IDA MCP headlessly Hex-Rays IDA MCP serves database reads only through execute_python, so REA rejected it as an upstream. A `hexrays` headless stdio registration now leases a private idalib worker through open_database, answers the existing database-supervisor reads with a fixed, packaged, read-only query module, and releases the lease with close_database, verified by list_databases. Observations record execute_python, the query and the module digest. Tool errors are typed so a completed rejection is distinguished from an unknown outcome; an unconfirmed release is retried and a late lease on the private input is adopted. Validated IDA source and bridge tests, static checks, docs, and npm run verify:ida on Linux x64 against x86-64 and AArch64 ELF fixtures. * feat(ida): name the Hex-Rays registration for its catalog A registration without `protocol` that reaches the official Hex-Rays server failed with only the missing database-supervisor tools. Startup profile failures now report the advertised catalog, and when it is the Hex-Rays one the message and recovery name the `hexrays` registration. Refs #1416 * docs(ida): state Hex-Rays prerequisites and upstream session traces Upstream needs IDA 9.4 or later with idalib, Python 3.11 or later, uv and Git. The profile does not analyze databases open in the IDA GUI, and the server keeps its own session traces outside REA's workspace. Refs #1416 * fix(ida): skip inline data when scanning Hex-Rays calls The call scan decoded every head that FuncItems yields. Inline data such as a jump table can decode as a call and refer to a function or import, which reported false callees and call-graph edges. Skip non-code heads before decoding, as disassembly already does. Refs #1416 * fix(ida): retain Hex-Rays health reads in evidence The identity and readiness reads around each operation kept only their parsed result, dropping the bridge digest and any engine output. Keep them whole as health_observations beside the parsed metadata, in both successful and partial-failure Evidence. Refs #1416 * test(ida): list the Hex-Rays bridge in package fixtures The packed-bridge verifier has required bridge/ida/hexrays_queries.py since the Hex-Rays profile landed, but three package tests still built their member lists without it. The verifier stopped at that file, so 21 cases failed or asserted on the wrong omission. Refs #1416 * feat(ida): open existing IDA databases through the Hex-Rays profile A headless open re-ran auto-analysis from the input binary, discarding the names, types and comments of an existing database and taking far longer on large targets. Target admission now identifies IDA databases by their IDA1/IDA2 signature, and the hexrays profile opens a private copy of one; Hopper and the other IDA profiles reject them. The copy is required, not incidental: idalib repacks a database when its last lease is released, even without a save. A database reports the input it was created from, so the session is bound to the opened copy's idb_path, and health now reports the input SHA-256 it records. Validated with resolver, provider and session tests, check:fast, docs:check and test:changed, plus a real Hex-Rays MCP run against a 1.4 GB SC2 .i64 whose original file was left byte-identical. Refs #1416 * fix(ida): verify the private workspace of a database target by idb_path * test(ida): fix Hex-Rays health stand-ins and Windows path and runtime teardown * refactor(ida): resolve the registration once for target support * docs(ida): record the real Hex-Rays run on an existing .i64 * docs(ida): make the Hex-Rays registration example install-neutral * chore: keep merge-hook formatting outside the IDA change * fix(ida): retain live Hex-Rays databases this server does not lease A list_databases row with instance_id null is a live owner, not a stopped database. Mapping it to the supervisor's released-worker shape made cleanup delete files another client still held. Unleased rows stay active, so the private path must leave inventory before the workspace is removed. Accept idat inventory rows, hash the query bridge with sha256Hex, and complete databaseEngine on Hopper fixtures added on main. * fix(ida): report uncapped Hex-Rays call graphs * docs(ida): link to the Hex-Rays bridge on GitHub * fix(ida): verify Hex-Rays worker identity and cleanup * feat(ida): support Hex-Rays idat headless workers Refs #12921 * fix(ida): retain workspace after ambiguous Hex-Rays startup * fix(ida): preserve typed Hex-Rays call edges and deadlines * test(ida): verify Hex-Rays cleanup with a peer lease * test(ci): use project deadlines for the Cutter verifier * test(ida): keep verifier cleanup fixtures scoped to mocked modules * fix(ida): retain the worker backend in partial evidence --------- Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
a1dec2d2d5 | docs: remove tracked planning and architecture records (#12856) | ||
|
|
e6ebfbecde |
docs(ghidra): label 12.1.x verification as history and point to the 12.2 baseline (#12656)
Recorded Ghidra 12.1.x runs are no longer the supported baseline. Mark those results as history and link the supported Ghidra and JDK range to the installation guide instead of restating it. Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
ed336bd31c | fix(ghidra): retain DOS images with order-dependent fixups (#12649) | ||
|
|
5664a6fbd4 | docs: clarify parser coverage and verification ownership | ||
|
|
a627952bd5 | fix(native): preserve numeric Mach-O identities and CodeView path bytes (#12458) | ||
|
|
ed05170424 |
fix(mips): recognize unsupported Android relocation declarations (#12397)
fix(elf): retain Android relocation declarations in MIPS coverage |
||
|
|
9b2c666033 | fix(mips): validate GNU attribute extents before read limits (#12348) | ||
|
|
170429eb7d |
feat(ghidra): admit plain MIPS32 PIC shared images (#2362)
* feat(ghidra): admit plain MIPS32 PIC shared images Add an elf32-dyn-o32-arch32r2-standard-v1 lane for ET_DYN images without an ASE flag (shared libraries and ET_DYN executables), beside the MIPS16 lane. It reuses the complete dynamic-relocation inspection and admits R_MIPS_NONE, symbol-bearing R_MIPS_REL32 and the TLS loader slots DTPMOD32/DTPREL32/TPREL32, which stay unapplied with a limitation. Ghidra's default moves an image linked at 0 to 0x10000 and then shifts only nonzero local GOT entries, so page-zero GOT entries (how GNU-ld libraries call static functions) keep unshifted values and calls through them decompile to wrong addresses. The lane imports at the image's own ELF image base instead (lowest PT_LOAD in the first 20 headers, as Ghidra computes it), commits it in the analysis profile and requires the bridge handshake to report it. Images with a prelink trailer are refused. verify:ghidra:mips32-shared checks LE, BE and soft-float LLD fixtures laid out like GNU ld output against an independent readelf oracle: every REL32, local GOT entry (including a zero page entry), global GOT entry (EXTERNAL or lazy-binding stub) and unapplied TLS slot, plus named calls in the decompilation, snapshot round trip and CLI evidence. Refs #2338 * style(ghidra): format link-base regression scenarios * test(ghidra): require zero-valued local GOT coverage * test(ghidra): cover TPREL32 in the shared lane and drop duplicated session suites Add an initial-exec TLS variable so the MIPS32 shared fixture declares R_MIPS_TLS_TPREL32 beside DTPMOD32/DTPREL32, and require all three slots to stay UNSUPPORTED with unchanged bytes. Remove the soft-float and mutation handshake suites that the main reconciliation duplicated in GhidraSessionValues.test.ts. * test(ghidra): read the section table in the MIPS32 shared-library oracle parseMipsReadelf now confirms the fixture's section types from readelf -S (main added -S to the executable, relocatable and PSP oracles). Request it in the shared-library oracle too. * test(ghidra): follow main's verifier contracts in the MIPS32 shared lane Main made the Ghidra installation probe asynchronous behind the shared inspectVerifierGhidraInstallation helper, and analyze_function now returns a summary unless detail "complete" is requested. Use both, as the other MIPS lanes do. * refactor(ghidra): keep Ghidra's image-base rule out of shared ELF parsing The shared MIPS ELF reader computed Ghidra's ElfHeader.getImageBase rule (lowest PT_LOAD address among the first 20 program headers) and the domain type described it as Ghidra's base. Record source facts instead: every PT_LOAD virtual address with its program-header index, plus the Android prelink trailer. ghidraMipsElfImageBase in GhidraMipsProfile now applies Ghidra's rule to those facts. The committed elf_image_base is unchanged. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> |
||
|
|
9b1ffa1f7d |
fix(ghidra): protect only unapplied relocation destinations, not their whole block (#11996)
Since #10483, an unapplied loader relocation in a non-writable block made that whole block volatile. TLS slots are such relocations and sit in .got beside the entries Ghidra did apply, so in any shared object or PIE with initial-exec or dynamic TLS every GOT-indirect call decompiled as pointer arithmetic instead of a named call. Mark each unapplied destination volatile through its data item's Mutability setting, creating an undefined item of the relocation's length where nothing is defined. Fall back to the whole block only when an instruction or a data item starting before the destination occupies it. Eligibility, limitations, the read-only path, permissions and source FileBytes are unchanged. The loader-relocation fixture now reads an initial-exec TLS variable whose R_X86_64_TPOFF64 slot shares .got with the applied entries. The probe requires that block and its applied entries to stay non-volatile and both unapplied destinations to have volatile data items; on the previous bridge it fails at applied_got_relocations_not_volatile. Rename loader_relocation_semantics to volatile-unapplied-relocation-destinations to state the new behavior. Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
55a50f53f9 |
fix(elf): reject undersized interpreter ranges before provider admission (#12113)
fix(ghidra): reject empty RISC-V PIE interpreter ranges |
||
|
|
8d226251a7 |
feat(ghidra): admit RISC-V position-independent executables (#4487) (#4811)
* feat(ghidra): admit RISC-V position-independent executables (#4487) Admit little-endian RISC-V ELF32 and ELF64 position-independent executables (ET_DYN with PT_INTERP) into the pinned generic Ghidra lane. - Collect `PT_INTERP` during the existing validated ELF table walk in `validateElfDeclaredRanges` and record `hasInterpreter` in target metadata, supporting arbitrary table offsets and extended program counts without duplicate scanning. - Admit ET_DYN images when `hasInterpreter` is present under lane identities `elf32-pie-le-double-float-generic-v1` and `elf64-pie-le-double-float-generic-v1`. - Preserve refusal for non-PIE ET_DYN targets (shared libraries without PT_INTERP) explaining that shared libraries require separate load verification. - Record load model facts (`load_model: "pie"`, `expected_default_image_base: "0x10000"` or `"0x100000"`, `has_interpreter: true`) in `riscv_elf` analysis profile parameters. - Record default image base analysis coordinates limitation for PIE targets. - Update `docs/ghidra-riscv.md` with PIE admission boundary and evidence semantics. - Add unit tests for PT_INTERP collection, high-offset program headers, and PIE profile resolution. - Add PIE fixture generation capability to `tests/conformance/ghidra/riscv-fixture.mjs` and pass `-Wl,-pie` to ensure bare-metal drivers generate ET_DYN. - Extend `scripts/verify-real-ghidra-riscv.mjs` to test both ET_EXEC and ET_DYN. Fixes #4487 * fix(ghidra): check structured facts and rethrow typed errors in PIE tests * style: format GhidraRiscvProfile.test.ts * fix(ghidra): restrict PIE admission to verified double-float RISC-V lanes |
||
|
|
86cf8942de |
feat(ghidra)!: import recognized DOS COM files with ComLoader (#12086)
* feat(ghidra)!: import recognized DOS COM files with ComLoader Select Ghidra 12.2 ComLoader for an admitted .com image and do not pass a base address, so the file stays at 0000:0100. Images ComLoader rejects use the explicit BinaryLoader import at 1000:0100 and record the typed reason. BREAKING CHANGE: A DOS COM file that ComLoader accepts now loads at linear 0x100 instead of 0x10100. Read load_address. The BinaryLoader fallback remains at 1000:0100. * fix(ghidra): score COM dollar-strings in one pass ComLoader's printable-run walk restarts at every offset, so a 64 KiB image of printable bytes blocked profile resolution. The same capped count now skips a run once an earlier start has seen every later dollar sign. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): align COM import facts with the image Ghidra receives Mismatch load-image coordinates follow the measured loader and address. A dotfile named .com keeps that suffix on the snapshot, and selection uses that snapshot name. The COM fallback verifier owns its MCP connection before connect. Co-authored-by: morluto <morluto@users.noreply.github.com> * style(ghidra): format COM snapshot and verifier files Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): keep measured COM facts and required MZ coordinates DOS MZ and a verified COM image keep load_segment and entry required. A COM mismatch emits a known loader or load address on its own, and omits the segment and entry only when that pair is not a known layout. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): require the verified COM layout and document both entries A verified COM image is either ComLoader at 0000:0100 or BinaryLoader at 1000:0100 with a fallback reason. The DOS guide queries 0x100 only for the ComLoader entry and 0x10100 for the fallback. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): attest COM imports against the committed loader --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
5c59bdc8a6 |
feat(ghidra)!: verify the bridge on Ghidra 12.2 (#12081)
* feat(ghidra)!: verify the bridge on Ghidra 12.2 Admit 12.x from minor 2 upward, with 12.2 and JDK 25 as the verified pair. The bridge now calls the four-argument storage API added in 12.2, so 12.1.x cannot compile it and is no longer accepted. BREAKING CHANGE: Ghidra 12.1.x is rejected. Use Ghidra 12.2 or another 12.x build at or above minor 2, and a JDK inside that installation's declared range (25 or newer for the verified 12.2 build). * docs(ghidra): point remaining lanes at Ghidra 12.2 The Windows, 6502, and m68k prerequisites still named 12.1.4 and JDK 21, which the verified-build check now rejects. The bridge compile lane names the 12.2 jars it actually compiles against. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ghidra): admit the JDK the verified install declares The Java home framing probe still reported JDK 21 while the verified installation fixture now declares a minimum of 25, so doctor admission failed before the path framing was checked. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ghidra): derive admitted install fixtures from the verified release Boundary hosts and assertions still named Ghidra 12.1.4 after admission moved to 12.2, so list_procedures evidence and completed property reads disagreed with the install the provider actually reported. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): record the exact 12.2 Clang switch-recovery defect Ghidra 12.2 stays the verified build. Sessions and decompiler results on that exact version name upstream issue 9996 and the 12.2.1 fix commit. Other version strings, including 12.2.1, do not carry the limitation. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ghidra): check switch-defect facts instead of the warning sentence The policy test keeps the structured defect record and checks that the owning formatter delivers its id, commit, release, and scope fields. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(browser): name the Playwright launch boundary the lifecycle catalog checks Main retitled that case with a platform placeholder. The coverage catalog still required the old literal, so the merged full suite reported a missing title. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(browser): point the lifecycle catalog at main's launch title The merged suite uses main's platform-specific Playwright launch test. The coverage catalog now names that title, and this branch keeps main's test body so the merge stays clean. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(browser): cover the platform launch title on this branch The lifecycle catalog names main's platform launch title. This branch now has that quoted test too, so the check passes before and after the merge. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): record the exact 12.2 masked byte-switch defect Ghidra 12.2 leaves an AArch64 and-0xff byte-offset switch unrecovered. Exact 12.2 sessions now cite open upstream issue 10154, and the AArch64 lane expects that jump table to stay unrecovered. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(browser): keep one platform launch environment check The second launch test repeated the selected environment check. The remaining test is the parameterized title, and the launcher forwards SYSTEMROOT on win32 so that assertion holds. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): keep the open switch defect on admitted builds The exact-version check cleared ghidra-10154 on every build except 12.2. That defect stays on admitted releases until one is known to fix it. ghidra-9996 still clears after the exact 12.2 build. Co-authored-by: morluto <morluto@users.noreply.github.com> * style(docs): format the Ghidra testing-lane table The AArch64 jump-table row wrapped past the formatter width and failed static checks. Co-authored-by: morluto <morluto@users.noreply.github.com> * test(ghidra): give the masked switch its full byte range The unrecovered oracle now uses 256 readable table bytes, and the same object must still recover its compare-bounded switch. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(website): point Ghidra setup at 12.2 and JDK 25 The public setup pages still told new users to install Ghidra 12.1.4 and JDK 21, which this release rejects. Changed setup sentences are extracted and left untranslated so those editions use the English page. Co-authored-by: morluto <morluto@users.noreply.github.com> * docs(website): keep catalog edits to the changed setup strings The catalog check compares active message ids, not a full rewrite. Restore the previous catalogs and update only the Ghidra 12.2 setup strings, leaving their translations empty. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): apply the closed switch defect from the parsed patch 12.2, 12.2.0, and 12.2.0 with a suffix all precede 12.2.1, so they keep ghidra-9996. The masked-switch table lists all 256 byte entries. Co-authored-by: morluto <morluto@users.noreply.github.com> * fix(ghidra): share the AArch64 switch fixture compiler invocation --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: morluto <morluto@users.noreply.github.com> |
||
|
|
c1546be70d |
refactor(ida)!: remove the legacy ida-pro-mcp 1.4 attached protocol (#11546)
* refactor(ida)!: remove the legacy ida-pro-mcp 1.4 attached protocol Attached IDA analysis now has one protocol, the native ida-free-mcp plugin. The legacy 1.4 GUI proxy branches, response schemas, tool profile, GUI navigation effects and plain-text reply kind are removed. A stored registration that still names "protocol": "legacy" is refused at configuration with a REA_IDA_MCP_CONFIG constraint naming the migration section; it is never read as another protocol and the file is not rewritten. Native and headless request/response handling is unchanged. Refs #10516 BREAKING CHANGE: "protocol": "legacy" IDA registrations are refused. Before (accepted, ida-pro-mcp 1.4 GUI proxy): {"mode": "attached", "protocol": "legacy", "command": "python", "args": ["/path/ida_pro_mcp/server.py", "--ida-rpc", "http://127.0.0.1:13337"]} After (native plugin for an open GUI database): {"mode": "attached", "protocol": "native", "url": "http://127.0.0.1:13337/mcp"} or an ida-pro-mcp 2.x database supervisor in headless mode: {"mode": "headless", "command": "idalib-mcp", "args": ["--stdio", "--max-workers", "1"]} procedure_callers is no longer available from any IDA profile, and IDA procedure_assembly/read_function_instructions no longer advertise may_show_ui. See docs/providers/ida-provider.md#migrate-a-legacy-attached-registration. * test(ida): deliver null metadata overrides and compare legacy refusal with its owner |
||
|
|
d87be930c4 |
refactor(providers)!: key Ghidra and Hopper analysis profiles on the producer identity instead of hand-bumped markers (#11320)
* refactor(ghidra)!: key analysis profiles on the producer identity instead of hand-bumped markers Ghidra snapshot validity depended on 53 hand-maintained "-vN" semantic markers in the analysis profile; a behaviour fix that forgot to bump its marker left old snapshots admissible (#3664). #10562 added a digest of the bridge sources, but TypeScript projection changes still needed a bump and the REA release was not committed. - src/filesystem/ProducerIdentity.ts owns the producer identity: the REA release plus a framed SHA-256 of a producer's packaged scripts, read once per process. - Ghidra profiles commit `producer` in place of `bridge_sources_sha256` and the constant revision markers (shared semantics block, load-image, entry seed, PDB, jump-table, DOL import, MIPS ISA-mode markers) are removed. - Runtime-selected values keep their meaning without a revision suffix (language_selection, annotation_policy, relocation/no-return/launch policy, MIPS/PowerPC/PSP lanes, MIPS ABI basis). Bridge wire policy ids shared with the Java scripts (ilp32-prototype-v1, o32-soft-float-prototype-v1) are unchanged. BREAKING CHANGE: Ghidra Evidence `analysis_profile.parameters` replace the semantic marker keys and `bridge_sources_sha256` with `producer` ({rea_version, sources_sha256}), and selection values lose their "-vN" suffix (for example `language_selection: "provider-pinned"`). Ghidra Evidence IDs and profile digests change, and analysis snapshots saved by earlier builds are refused at open. Migration: open the target without the old snapshot and save a fresh one; consumers reading the removed marker keys should read `producer` instead. * fix(hopper)!: commit the REA release and bridge script in Hopper analysis profiles (#11324) Hopper analysis profiles committed the launcher digest and one hand-bumped marker (function_dossier_coverage "...-v1"), but neither the REA release nor bridge/hopper_bridge.py. A snapshot saved before a bridge or REA change replayed results the current bridge would not produce. HopperBridgeSources owns the packaged bridge script URL (used to launch it) and hopperProducerIdentity() on the shared ProducerIdentity owner; the profile commits `producer` in place of the marker. BREAKING CHANGE: Hopper Evidence `analysis_profile.parameters` replace `function_dossier_coverage` with `producer` ({rea_version, sources_sha256}). Hopper profile digests and Evidence IDs change, and analysis snapshots saved by earlier builds are refused at open. Migration: open the target without the old snapshot and save a fresh one. * fix(ghidra): build the legacy reference snapshot from another producer and use the shared temp directory * refactor(providers): key Kuna exports and the Native AOT profile on the producer identity (#11353) * fix(ghidra): keep the bridge source table import-free for the Node-loaded verifier scripts/verify-ghidra-bridge-sources.mjs loads GhidraBridgeSources.ts with Node type stripping, which does not resolve .js specifiers to .ts sources. The producer identity import made every verifier run fail with ERR_MODULE_NOT_FOUND; the identity now lives in GhidraProducerIdentity.ts. * fix(artifacts): import the moved file source and abort check from their resources owner after merging main |
||
|
|
1995ab7fce |
fix(elf): admit Xtensa through canonical target contracts (#11178)
Admit ELF machine 94 as the canonical Xtensa family through Ghidra's header-selected import. Share generic-header exclusions between static target types and live CLI/MCP summaries, preserving ELF-only format constraints and other providers' decline paths. Fixes #10765. Adapted from #10774. Co-authored-by: Josh <joshuakrishna21@gmail.com> Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
607a7872bb |
refactor(jeb): classify JEB failures through the shared provider classifier (#10831)
* fix(pcap): report a refused tool launch as an unavailable tool When a capture read's tool launch was refused with EPERM, pcap reported it as unreadable tool output (AnalysisProtocolError) instead of an unavailable tool. Pcap also never told "not executable" apart from "missing". Add classifyLaunchFailure in src/process as the one owner of which spawn errnos mean missing (ENOENT, ENOTDIR) and which mean present but not executable (EACCES, EPERM, ENOEXEC, EISDIR). Pcap, apktool and gdb used three different errno lists; all three now use it. * refactor(process): classify owned command outcomes through one owner Add ProviderOutcome, read once from the supervisor's facts, and classifyProviderOutcome, the one mapping from an outcome to a typed error. Migrate pcap and the shared artifact producer command failure (TShark, sigrok). Add the rea/provider-failure-classifier lint rule with a shrink-only baseline of per-site (cause: unknown) => AnalysisError functions. * refactor(process): classify Java and adb launch refusals with the shared owner (#10598) The Ghidra and JADX Java probes and adb's version probe now take missing-versus-not-executable from classifyLaunchFailure instead of their own errno checks. ELOOP and ENAMETOOLONG join the owner's missing set, so adb keeps its existing classification and both Java probes now treat a non-directory path component as a missing runtime. * fix(pcap): preserve command launch attribution * test(pcap): expect an unknown failing stage when a limited capture tool exits unsuccessfully * refactor(process): classify owned command outcomes through one owner Add ProviderOutcome, read once from the supervisor's facts, and classifyProviderOutcome, the one mapping from an outcome to a typed error. Migrate pcap and the shared artifact producer command failure (TShark, sigrok). Add the rea/provider-failure-classifier lint rule with a shrink-only baseline of per-site (cause: unknown) => AnalysisError functions. * test(lint): cover baselined files in the provider-failure classifier rule * fix(apktool): report the decoder JVM's heap exhaustion as memory, not a target refusal The supervisor now watches for a managed runtime's out-of-memory report while output streams (JVM java.lang.OutOfMemoryError, V8 'JavaScript heap out of memory'), so a retention budget cannot hide it. ProviderOutcome gains a runtime-exhausted kind and classifyProviderOutcome maps it once. Apktool decode opts in and moves to the shared classifier; Ghidra's single-purpose output token becomes the JVM runtime option and its area matching reuses the shared table. * fix(process): keep the runtime's out-of-memory report on the memory error it supports * fix(pcap): attribute a limited capture's exit through the prlimit wrapper * fix(process): keep a shortened out-of-memory line marked as shortened * fix(process): identify the refused executable for every launcher shape Name the executable on errnos Node throws synchronously from spawn (ENOEXEC, ENOTDIR, ...) and read the Windows native launcher's executable-launch constraint, so pcap attributes those refusals to the selected tool or limiter instead of an unknown stage. * test(pcap): prove synchronous launch naming with ENOTDIR on every POSIX host * fix(apktool): advise the JVM limit that governs the reported memory area * fix(ghidra): read the supervisor's parsed OOM area instead of reparsing lines * fix(sqlite,capture): read V8 heap exhaustion from streamed output, not retained stderr (#10724) The SQLite worker and the Node capture decoders now declare runtime: "v8", so the supervisor observes V8's heap report as output streams. Both classifiers read the runtime-exhausted outcome instead of matching retained stderr, so a report beyond the retention budget, or one whose process then overflowed its output budget, is still reported as memory exhaustion. * refactor(evm): classify EVMole worker outcomes through the shared provider classifier (#10716) * refactor(evm): classify EVMole worker outcomes through the shared provider classifier The EVMole worker's cancellation, deadline, output budget and CPU/file-size signals now go through classifyProviderOutcome; only the prlimit launch refusal and the reserved EFBIG exit remain in its dialect. The worker is opted into V8 exhaustion scanning so a heap report names its fixed 256 MiB heap. providerOutcomeOf now reads a launch refusal only from a spawn errno, so a private-storage or carrier read errno is no longer reported as a limiter launch failure. * fix(evm): keep a stream failure's exit status and update Linux worker expectations * refactor(process): read launch refusals through the launcher identity owner * refactor(wasm): classify WABT command outcomes through the shared provider classifier (#10727) * refactor(wasm): classify WABT command outcomes through the shared provider classifier WABT's cancellation, command deadline, output budget, and inherited-limit signals now go through classifyProviderOutcome; its dialect keeps only the configuration-probe and launch-refusal unavailability and the unclassified-exit output error. A tool ended by SIGXCPU/SIGXFSZ or the memory limit is now a resource constraint instead of an output error, and a refused launch in the producer phase is reported as unavailable. The shared timeout context gains the analysis setting that selected the deadline, and the output-limit context may name its exceeded budget. * fix(wasm): keep setup guidance when a WABT version probe's output cannot be collected * refactor(providers): classify raw provider failures through one owner * refactor(process): build classified cancellations with cancelledBy and the carried caller reason * chore(lint): count runOwned's close-failure mapper from main in the classifier baseline * fix(process): carry the runtime's exhaustion report on every memory error that claims it SQLite and historical-capture memory errors recognised a streamed V8 heap report but dropped it, so a report outside retained output reached callers without its source line or omission flags. One projection, runtimeExhaustionReport, now owns that shape for the shared classifier and both consumers. Also lowers the EVMole and WABT cancellation-constructor baselines. * fix(process): keep the provider's recovery for a native-thread exhaustion report The shared classifier replaced the provider-supplied recovery with generic capacity advice whenever the JVM reported it could not create a native thread, dropping Apktool's launcher guidance and flipping retryable to true. The provider's recovery now wins; the capacity advice remains the fallback for providers that supply none. * refactor(pwntools): classify pwntools failures through the shared provider classifier (#10782) * refactor(pwntools): classify pwntools failures through the shared provider classifier pwntools' per-site classifier is replaced by pwntoolsFailureDialect for classifyProviderFailure. Command outcomes go through classifyProviderOutcome, launch refusals through launcherRefusalOf instead of a 'spawn ' syscall prefix check, the input limit through the file dialect's fileSize, and the cleanup report through commandCleanup. The shared read cancellation now carries the reader's partial observation, and resource-signal reports accept provider detail. * fix(pwntools): report a failed command's output once and expect resource_constraint for overflow The shared outcome owner already attaches the command's output as capturedOutput, so the pwntools adapter fallback no longer copies the same text into diagnostics.stdout, diagnostics.stderr and diagnostics.captured_output; diagnostics keep the exit facts. Update the overflow expectations the dialect migration missed (layout provider cleanup and over-budget rows, pwntools cleanup) to resource_constraint. * refactor(wasm): leave WABT cancellation to the shared owners WabtFailures matched any Error named AbortError as a cancellation. No WABT path produces one: reads, path checks and owned commands report cancellation as ArtifactReaderFailure or OwnedCommandFailure, which classifyProviderFailure and classifyProviderOutcome already classify with the caller's reason. The provider's two signal checks now build the cancellation with cancelledBy. Lowers the AnalysisCancelledError constructor baseline for both WABT files to zero. * fix(wasm): report a cancelled snapshot write as the caller's cancellation The private snapshot write passed the caller's signal to Node's writeFile, whose abort envelope reached the dialect's unclassified output failure once the name-based AbortError guess was removed. The write now turns the envelope carrying its own signal's reason into cancelledBy at the producer. * refactor(firmware): classify firmware failures through the shared provider classifier (#10810) Firmware producers now report their own deadline expiry: the start check, the output inventory and launcher admission throw the phase timeout where they observe the abort, and a read the phase signal cancelled reports it through the dialect's interruption. The classifier no longer rereads a cancellation's reason as a timeout. A new readCleanup hook keeps firmware's cleanup report shape. * refactor(captures): classify TShark, sigrok and pcap failures through the shared provider classifier TsharkCaptureProvider and SigrokRecordingProvider replace #failure with a dialect, and PcapProvider replaces analysisFailure and the tool-identity classifier. ArtifactAnalysisResources exposes its command context and a readCleanupFailure composer so the readCleanup hook keeps each provider's cleanup report shape. * refactor(jeb): classify JEB failures through the shared provider classifier JEB's raw MCP failures go through classifyProviderFailure with a JEB dialect; a typed attribution step reports a shared phase's failure under the REA operation. Each MCP phase deadline now reports its own interruption when it aborts, deciding a cancellation's owner from the caller's own signal instead of comparing abort reasons. A refusal carrying the JVM's OutOfMemoryError report becomes a resource constraint naming JEB's Java heap. * fix(jeb): advise the JVM limit that governs the reported memory area * refactor(ghidra): classify Ghidra failures through the shared provider classifier (#10836) * refactor(ghidra): classify Ghidra failures through the shared provider classifier PSP extension inspection reports through classifyProviderFailure with a Ghidra dialect. The startup deadline decides at abort time whether the shared startup owner closed it, so Ghidra and Hopper no longer compare the abort reason with the owner's sentinel, and Ghidra's startup no longer compares a producer cancellation's reason with the deadline's. Three helpers that only construct one error kind now name that kind instead of AnalysisError. * refactor(hopper): classify original-source read failures through the shared provider classifier (#10838) * test(ghidra): pin the aborted startup deadline over a producer cancellation * refactor(kuna): classify Kuna failures through the shared provider classifier (#10843) Session operations, the workspace copy and the project export report raw failures through classifyProviderFailure with Kuna dialects; the copy and export keep their cleanup report shapes through the readCleanup hook. * chore(guards): shrink the cancellation construction baseline after merging the base |
||
|
|
80755a9d16 |
fix(doctor): refuse Ghidra on Windows when REA_GHIDRA_PROJECT_PATH selects an existing project (#10981)
* fix(doctor): refuse Ghidra on Windows when REA_GHIDRA_PROJECT_PATH selects an existing project Runtime refused an existing project on Windows before admission, but doctor did not read REA_GHIDRA_PROJECT_PATH, so it reported Ghidra ready for a registration the provider then refused. The existing-project host check is now part of Ghidra's admission owner; doctor reads the setting from the client's registration and reports a failed existing_project check, and the provider projects the same refusal. An unresolved project path makes doctor's Ghidra answer unknown only on Windows, the one host it affects. * test(ghidra): read the existing-project setting through doctor's system inspection |
||
|
|
3afd8a16ee |
feat(evidence)!: give Evidence bundles a format revision owned by one module (#10861)
* feat(evidence)!: give Evidence bundles a format revision owned by one module `src/domain/evidenceFormat.ts` owns Evidence format evolution. Bundles now carry `evidence_format: 1`; every bundle reader admits only the current revision and refuses an unmarked or other-revision bundle once, with the single recreate-observations guidance, instead of admitting earlier shapes one optional field at a time. The 6.7-era artifact inventory summary identities are no longer rebuilt: compare_artifacts checks the current projection only and reports a mismatch with the owner's guidance. The pre-6.6 identity diagnosis uses the same guidance. SQLite `worker_timeout_ms` and Dart AOT `string_pool.policy`, optional only for historical Evidence, are now required. BREAKING CHANGE: Evidence bundles written by REA 6.x (no `evidence_format`) are refused by import, comparison, reconstruction and analysis-snapshot readers as an integrity mismatch telling the caller to recreate the observations; re-exporting an earlier bundle does not update its format or identities. Bundles constructed by hand must include `"evidence_format": 1`. 6.7-era artifact summaries are refused by compare_artifacts, and SQLite and Dart AOT Evidence without the newly required fields fails validation. * fix(evidence): let the ledger application admit its bundle's format build_reconstruction_obligation_ledger registered the full bundle schema with the SDK, so an unmarked or other-revision bundle was refused as invalid_request before the format owner ran. Register it like coverage: the application parses the request envelope and admits the bundle. * feat(pcap)!: read capture Evidence through the current result schema only (#10879) Delete the pcap read-compatibility schema that defaulted executable identity for historical capture Evidence, and require query_labels_hex (null when unknown) now that every producer writes it. Evidence from an earlier format is refused at the bundle format owner; a record that omits these fields is reported as malformed instead of defaulted. BREAKING CHANGE: inspect_pcap_capture results always carry query_labels_hex, and analysis views no longer default missing tshark/capinfos identity fields. * feat(desktop)!: require the effective view policy in desktop state Evidence (#10886) inspect_desktop_application_state always records the complete policy it used, including sqlite_view_bytes. Drop the optional historical shape and the task draft's absent-policy branch. BREAKING CHANGE: desktop application state results without effective_view_policy, or with a policy missing sqlite_view_bytes, are refused as malformed. * feat(android)!: require component declaration facets and reference aggregates in Android Evidence (#10904) * feat(android)!: require component declaration facets and reference aggregates in Android Evidence The JADX producers always write the manifest component projection with every declaration facet, target_definition and direct_invokes_coverage. Require them, delete the duplicate observed component schema, drop the unknown declaration coverage that only described historical omission, and give manifest view results their explicit facet. BREAKING CHANGE: Android package, component and reference results missing these fields are refused as malformed; component declaration_coverage and its summary counts no longer include unknown; manifest view results always carry facet manifest. * refactor(android): parse package results with the domain schema directly * feat(browser)!: require the DOM length unit and redirect-scoped prior-hop facts (#10897) * feat(browser)!: require the DOM length unit and redirect-scoped prior-hop facts Both CDP producers always declare node_value_length_unit, and the observation session writes redirect_response on every redirect event and no other. Require the unit, drop the diff's absent-unit branch, and admit redirect_response exactly on redirect rows. BREAKING CHANGE: DOM snapshots without node_value_length_unit and redirect timeline rows without redirect_response are refused as malformed, including inline inspections passed to compare_web_captures. * docs(browser): drop the historical redirect_response omission note * feat(native)!: require native Evidence fields that were optional only for historical Evidence (#10946) Mach-O encryption, slice malformed cause, symbol runtime names and import facts; ELF export encoding facts and visibility; value-flow limits; load-image permissions and relocation symbols; Swift type-reference kind and GPU AMD target metadata are required. Legacy enum values (unrecorded, unknown visibility, undecodable, modinfo_field_exceeds_limit) and the retained schemas, view defaults and reinterpretations that served historical Evidence are deleted. BREAKING CHANGE: native records missing these fields are refused as malformed; recreate the observation. |
||
|
|
8428de13d3 |
feat(ida)!: require an explicit protocol for attached IDA registrations (#10846)
* feat(ida)!: require an explicit protocol for attached IDA registrations An attached registration (the default mode) silently selected the legacy ida-pro-mcp 1.4 GUI proxy when `protocol` was omitted. The registration schema now resolves the upstream protocol once: attached registrations must name `"legacy"` or `"native"`, headless registrations resolve to the database supervisor, and consumers read the resolved protocol instead of inferring it from `mode`. BREAKING CHANGE: an attached IDA registration without `protocol` is refused with a configuration error naming the choice. Add `"protocol": "legacy"` to an ida-pro-mcp 1.4 proxy registration (or `"protocol": "native"` for the ida-free-mcp plugin). Headless registrations are unchanged. * test(ida): name the protocol in every attached registration fixture The setup budget fixture still wrote an attached URL registration without a protocol, and the IDA registration rejection fixtures relied on the missing protocol as one of several failures. Each now names its protocol, so setup reaches its timeout checks and every rejection case fails only for its own constraint. |
||
|
|
17a5f14f98 |
fix(process): run ps from fixed system locations, not REA's PATH (#10755)
* fix(process): run macOS ps from /bin/ps, not REA's PATH Owned process cleanup and process sampling ran "ps" through REA's PATH, so an unusable PATH turned a confirmable cleanup into an incomplete one (spawn ps ENOENT). macOS ships ps at /bin/ps on the sealed system volume. Linux keeps the documented procps-on-REA's-PATH contract. * test(process): stop the ps fixture only after its descendant spawned * fix(process): run Linux ps from fixed system locations before REA's PATH Linux process ownership now runs the first executable of /bin/ps, /usr/bin/ps and /run/current-system/sw/bin/ps, searching REA's PATH only when none exists. Admission refusals name the ps that ran in their reason and ps_command/ps_source diagnostics; cleanup failure reasons keep the executed command. Doctor and remediation text follow the same selection. The macOS cleanup test now releases its fixture group even when the descendant wait fails. * fix(application): keep which ps ran in provider availability ownedProcessPrerequisiteAvailability copied only the admission and system codes from a Linux ps refusal, so Ghidra, JADX and Apktool status lost ps_command and ps_source. Copy the refusal's prerequisite facts from one key list. |
||
|
|
3fbc940330 |
fix(ghidra): report byte-search cursor mismatches without schema repair
A cursor for another target, profile, pattern, mask, bounds, or document was reported as invalid input and pointed at schema repair. Name the binding, attribute the issue to the cursor, and leave the differing component unknown. Fixes #8366 Supersedes #8420 Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
8e2853dd7b |
fix(ghidra): prevent loader relocations from constant folding (#10483)
* fix(ghidra): prevent loader relocations from constant folding Ghidra imports loader relocation destinations with their file bytes. A destination in a non-writable loaded block can be populated by the runtime loader instead, for example a copy-relocated musl `stderr` in RELRO, so the decompiler folded the on-disk zero and showed `fprintf(NULL, ...)`. Before initializing the decompiler, mark each loaded, initialized, non-writable block containing a relocation destination volatile in the ephemeral database, and add a limitation to procedures that read such a destination. ELF shared objects and PIEs are included; relocatable objects and core files are not. Permissions and source FileBytes are unchanged. Sessions without database-mutation authority (Windows P0 and existing caller projects) record the limitation but do not mark blocks volatile, and the analysis profile versions the two behaviors separately. A real Linux Ghidra ELF probe runs in the Ghidra bridge CI lane. Fixes #4177 Squashed from #4198 and rebased onto main. Rebase adaptations: the read-only gate, the verifier renamed to verify-ghidra-loader-relocation so it stays out of the manual-verifier glob, docs moved to docs/testing-lanes.md and docs/providers/ghidra-provider.md. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ghidra): await installation inspection in the relocation verifier inspectGhidraInstallation became async on main after #4198's base, so the verifier asserted on a pending Promise. Also wait for provider output to close before reading it, like the sibling Ghidra verifiers, and keep the workflow reference inside the docs site. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ghidra): address relocation review findings - Version the existing-project analysis profile with the read-only relocation semantics, since those sessions now add the limitation. - Inspect the installation through the verifier helper that owns the file-reader resources. - Build the fixture with -fPIC: with -fPIE, GCC 12 emits a copy relocation of rea_external_value into writable .bss, so the probe's GOT check could not hold. - Run probe cleanup through withVerifierCleanup so a cleanup failure does not hide the probe failure, and keep the workspace when owned Ghidra cleanup is incomplete. - Link the workflow with a full GitHub URL, per the docs guide. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ghidra): reach the external data through the GOT with a weak extern Building the whole fixture with -fPIC also turned the reader's direct load of rea_loader_pointer into a GOT-relaxed lea plus two loads, and the real-Ghidra lane then reported that the baseline no longer folds the file constant. Keep -fPIE and declare only rea_external_value weak: GCC and clang must reach a possibly absent symbol through a GOT entry, which lands as R_X86_64_GLOB_DAT inside GNU_RELRO (checked with readelf for GCC 12.2 and clang/lld). Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ghidra): protect only relocations Ghidra could not apply Running the real-Ghidra lane locally (Ghidra 12.1.4, JDK 21, GCC 12) showed that marking every non-writable block that holds a relocation volatile also marks full-RELRO .got. External calls then decompile as opaque pointer calls (`(*pcVar2)(param_1)` through `PTR_rea_external_...` instead of `rea_external(param_1)`), which the probe's GOT-stability check caught. Ghidra applies GLOB_DAT and RELATIVE relocations, so those bytes already hold the loader's value and folding them is correct. The #4177 case is a copy relocation, which Ghidra imports as UNSUPPORTED with the file's zero in place. Protect only destinations whose relocation status is not APPLIED or APPLIED_OTHER. The fixture now reads a provider `const` object that the linker copies into .data.rel.ro, the #4177 shape. The probe requires that relocation to be unapplied and requires applied GOT relocations to stay non-volatile. Ghidra 12.1.4 already shows this x86-64 read by name without protection, so the probe records whether the baseline folds and compares before and after only when it does. The profile value becomes volatile-unapplied-relocation-blocks-v1. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Arslan Basharat <arslanbasharat414@gmail.com> Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
7db1b61790 |
fix(ghidra): qualify inferred no-return cuts by the excluded fall-through
A terminal call on one branch does not end the whole function: other branches can still reach the following code, which stays in the body and pseudocode. The function-level limitation now says Ghidra excluded that call's fall-through and that code reachable only through it is missing if the callee returns. It is listed before the call-specific facts so a bounded composed summary that admits limitations in order keeps it. The body-coverage tests now check the counted records and their reasons instead of freezing the explanatory sentence. Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ad2111fac6 |
fix(ghidra): say when an inferred no-return call cuts a function
Ghidra's Non-Returning Functions - Discovered analyzer can mark a returning callee, such as an imported operator new thunk, as non-returning. Ghidra then clears the fallthrough at each call site and refits the callers, so a constructor decompiles to a few plausible lines. REA reported the terminal call with the FunctionManager flag but did not say the result omits the code after it or how to compare. That analyzer bookmarks each entry it marks with the Analysis comment "Non-Returning Function Found" (Ghidra 11.0 through 12.1.4 source); the name-list Known analyzer writes "Non-Returning Function Identified". When a terminal call's callee, or the function a thunk forwards to, carries the Discovered bookmark, the call's limitation now says the flag was inferred, and the function adds one address-free limitation that its body and pseudocode end at that call and omit the following code if the callee returns, with the REA_GHIDRA_DISABLED_ANALYZERS comparison. A flag without the bookmark keeps an unknown origin. The function-boundary observation contract moves to v5 so snapshots from earlier bridges are not replayed without the qualification. Refs #10365 Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
a01674377f |
feat(native): support ReFS filesystem authority (#10086)
* docs(native): specify Windows ReFS filesystem authority * docs(native): plan ReFS filesystem support * feat(native): admit ReFS filesystem identities * feat(native): support ReFS filesystem authority * feat(native): advertise ReFS Windows support * docs(native): format ReFS support documents * docs(native): record ReFS verification tasks * docs(native): record ReFS draft pull request * docs(website): correct remaining ReFS translations * fix(docs): correct Windows native guide link in ReFS plan --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
ab8e31dc76 | test(settings): exercise Windows limits and refresh guidance | ||
|
|
47bcd9c129 |
docs(settings): retain runtime recovery guidance after stack integration
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> |
||
|
|
cb4e5cfbff |
feat(analysis): make resource budgets recoverable across CLI and MCP (#9706)
* refactor(analysis): centralize resource budgets and recovery facts * feat(analysis): expose ASAR and Ghidra runtime admission controls * feat(artifacts): expose reader admission and preserve limited recognition * feat(javascript): expose recoverable semantic precision budgets * feat(web): add recoverable source-map budgets and compact retained views * feat(web): make historical capture decoding budgets recoverable * fix(desktop): enforce selected view policies across capture and export * feat(runtime): make Frida and LLDB retention budgets selectable * feat(native): expose diagnostic budgets and preserve exhaustion causes * feat(managed): expose recoverable snapshot and representation budgets * feat(metadata): make Go and Rust inspection budgets recoverable * feat(wasm): expose representation and producer admissions * feat(evm): expose per-call worker resource budgets * feat(android): make resource and string-pool omissions recoverable * feat(producers): expose command and recorded-capture budgets * docs(analysis): record recovery contracts and integrated validation * fix(docs): link calibration oracle from published verification pages * fix(docs): restore desktop task anchors and receipt links * test(analysis): align fixtures with selectable budget contracts * fix(analysis): remove source-location projector dependency cycle * test(analysis): refresh budget recovery and verifier regressions * test(analysis): preserve format and publication recovery expectations * test(windows): align conformance with owned runtime admission * fix(desktop): preserve selected alias kinds in exported state * test(analysis): align provider fixtures with recoverable budgets * test(desktop): validate emitted alias metadata structurally * fix(ghidra): classify bounded Windows endpoint refusals * test(cli): assert selectable artifact admission recovery * fix(cli): preserve capture provenance in environment builds |
||
|
|
1f9bf8af0e |
fix(providers): mark callee coverage partial at computed call sites (#8340)
* fix(call-path): keep computed-call targets out of complete callee coverage Ghidra reported complete callee coverage when a computed call had one ReferenceManager target, so trace_call_path, build_call_path and the function comparisons turned the static candidate into a definite negative. The bridge now keeps those targets as observed callees and marks callee coverage partial, naming the computed call sites. IDA callee reads cannot classify their call sites, so their callee coverage is partial too. The Ghidra call-coverage profile revision refuses older snapshots. A source-owned x86-64 bridge probe in the ghidra-bridge-sources job checks the slot, register and direct-call controls against real Ghidra. Fixes #8277 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ci): match the observed call coverage probe marker --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> |
||
|
|
887b99888e |
fix(ghidra)!: distinguish skipped overlays in byte search (#8608)
* fix(ghidra)!: distinguish skipped overlays in byte search BREAKING CHANGE: Byte search results require skipped_overlays; loaded overlays no longer appear in skipped_not_loaded. The Ghidra profile changes so prior snapshots are not replayed. * fix(cli): explain overlay byte search scope * test(ghidra): exercise overlay search cursor handoff * test(ghidra): avoid freezing byte search help wording * test(ghidra): classify search start as an address bound * docs(ghidra): match the raw lane's overlay coverage The raw Ghidra lane checks a manually created overlay block through MCP. Say that, and do not claim an overlapping-load ELF, CLI search, or snapshot cursor handoff. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
015a02d57b |
feat(ghidra)!: identify containing code and data (#8777)
* feat(ghidra)!: identify containing listed instructions * fix(ghidra): validate instruction containment status * fix(ghidra): validate containment coordinates * feat(ghidra): identify containing defined data * test(ghidra): correct snapshot and containment controls * docs(native): distinguish object and dynamic type sizes * docs(cli): retain incoming reference guidance * fix(mcp): clarify data object address guidance * test(ghidra): preserve defined data in reference fixtures |
||
|
|
9109e6f6a7 |
fix(ghidra): guide ambiguous selector recovery (#8768)
* fix(ghidra): guide ambiguous procedure selection * test(ghidra): distinguish malformed selectors * fix(ghidra): distinguish ambiguous file mappings * fix(ghidra): name mapping inspection workflows * docs(mcp): expose strict Ghidra address selection * docs(cli): explain Ghidra qualified address selection * test(ghidra): cover published ambiguous selector codes MCP and projection tests use procedure_ambiguous and file_offset_ambiguous, and match the recovery main already publishes for those codes. * fix(ghidra): name the space-qualified address that avoids offset fallback file_offset_ambiguous now tells the caller to use a form such as ram:0x1000. A bare 0x selector repeats the file-offset lookup. The MCP test requires that route and inspect_native_load_image. --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
c06b53644b |
fix(ghidra)!: preserve facts in inventory searches (#8376)
* fix(ghidra)!: preserve facts in inventory searches BREAKING CHANGE: Ghidra snapshots made before the search projection profile revision no longer match. Run fresh analysis and save a new snapshot. * test(ghidra): update raw profile digest goldens |
||
|
|
a67525cdf1 |
docs: organize canonical documentation layout and verify new pages (#2791)
* docs: organize canonical documentation layout (URGENTE) Group all existing authored guides by domain and ownership, expose complete navigation, and preserve their public routes. Update physical path consumers and release configuration while retaining historical records. Document domain-based specs and ADR slugs without global numbering. Co-Authored-By: Codex <noreply@openai.com> * fix(docs): honor home layout in all-page route verification * style: format reviewed source changes * fix(docs): preserve routes and navigation cache inputs * fix: repair the static-check failures on the default branch (#2895) * fix: repair the static-check failures on the default branch The default branch fails its own required `Static checks` job three ways, so every pull request reports that job as failed regardless of its own change. - `npm run format:check` reports `src/domain/functionComparison.test.ts` and `src/ida/IdaOperationRunner.ts`. - `npm run lint` reports a duplicate `import { join } from "node:path"` in `tests/boundary/mcp/ghidraInventoryMcp.test.ts` (lines 4 and 17). - `npm run typecheck` reports `format: "devin"` missing from the client format union in `src/application/SupportedClients.ts`, and an unchecked index in `tests/boundary/cli/clientProfileLifecycle.test.ts`, whose pair array is inferred as `string[][]`. Apply the pinned formatter, drop the duplicate import, list the `"devin"` format that its own definition already uses, and mark the pair array `as const`. Validation: `npm run check:fast` and `npm run format:check` pass. * fix(setup): keep Devin on the JSON configuration dialect --------- Co-authored-by: 吴佳浩 <wujiahao@supremind.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com> * fix(docs): update links after guide relocation * docs: correct verified documentation route counts * fix(docs): update browser capture guide link after move (#2820) Refresh gettext protected-link comments alongside the authored href. Co-authored-by: Codex <noreply@openai.com> * fix(docs): include http3 lab in stable routes * fix(docs): preserve historical release evidence and links * fix(ghidra): restore Windows verifier identity import * docs(wakaru): preserve pinned upstream policy link * docs(index): retain recently added guide links * docs(mcp): preserve parent retention clarification * fix(cli): preserve standalone import guidance * fix(test): preserve translated guide link drift coverage --------- Co-authored-by: Matheus Breguêz <matbrgz@gmail.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: morluto <17176810+morluto@users.noreply.github.com> Co-authored-by: 吴佳浩Alben <35291372+XiaoBinGan@users.noreply.github.com> Co-authored-by: 吴佳浩 <wujiahao@supremind.com> |