Commit Graph
18 Commits
Author SHA1 Message Date
Justin John a5fa1cd739 Stop Ghidra's analysis when the project that started it is deleted (R1.5) (#1893)
In Deep mode a build starts Ghidra's one-time analysis on its own thread, and it kept running after its project was deleted, using a core and about 12 GB of memory until the app closed. The analysis now also stops once the project's record is known to be gone, checked on its existing polls. Pausing is unchanged, and a record that can't be read for a moment doesn't stop it. Fixes #948.
2026-11-15 14:08:51 +07:00
Afloat a1581c0400 Keep warnings from every view in the .NET application graph (R3.12) (#1663)
The application graph is built from the assembly's inventory, members and native boundaries but only passed on the members' warnings, so a warning only the inventory or the native mappings raised (such as trailing bytes in an attribute's signature) disappeared from it. The graph now combines all three, keeps each view's first warning in view, and removes repeats before its 20-warning limit.
2026-11-11 18:20:41 +07:00
Afloat e9e78485cb Report trailing bytes after .NET signatures instead of ignoring them (R3.12) (#1632)
Signature readers returned the decoded signature and silently accepted bytes after it. Complete method, field, local, TypeSpec and instantiation signatures now note when their blob carries extra bytes: the decoded types are kept, as the runtime uses them, and the inventory, member and native-boundary views say once that some signatures have trailing data that wasn't interpreted.
2026-11-11 17:23:14 +07:00
Afloat 4d87c5edc7 Preserve repeated observations when comparing evidence bundles (R3.11) (#1613)
`core_evidence_exports_compare` indexes each operation/subject by a single record. Normal exports can contain several observations of that subject, including different text pages or successive versions of the same address annotation. Later index insertions silently overwrite earlier observations, so additions and removals disappear, changing record order changes the comparison, and one intact page can hide a tampered page from the changed count.
2026-11-11 13:59:58 +07:00
Afloat 9480cc0108 Report partial text coverage when the final line is cut (R3.11) (#1610)
A text-read page that reached the last line of a file but cut a line at the 256 KiB limit reported cut_lines correctly, yet its coverage said complete because it was worked out from the line count alone. Coverage is now partial whenever a line on the page was cut.
2026-11-11 13:36:32 +07:00
Afloat b11ba97427 Keep evidence-based call paths within one input binary (R3.11) (#1612)
Function studies identify their source bytes, but `app_call_path_find` currently joins their addresses without checking that source identity. Two different binaries can therefore contribute different edges at the same addresses and produce a call path that exists in neither binary. The regression uses two real ELF targets: one has main → helper, the other has helper → dispatch, and neither contains the complete main → dispatch path. Both inline records and saved evidence references reproduce the false path.
2026-11-11 13:17:54 +07:00
Afloat 28d1063a52 Bound input reads and refuse non-regular files before reading (R3.11) (#1611)
The input loaders trust an earlier file-size report before reading to EOF. A regular virtual file can report zero bytes and still return data beyond the configured limit, and files can grow between the size check and read. Some loaders accept devices or pipes, allowing a text or evidence-bundle request to wait indefinitely for a writer. Prefix reads also use metadata size to decide whether to assign a whole-file hash, so a truncated prefix of a zero-size-reporting file is misidentified as the whole input.
2026-11-11 13:14:35 +07:00
Afloat 6a4dee893e Keep native function evidence from blocks before its entry (R3.11) (#1600)
A native function can branch to a body block placed before its entry address. The control-flow graph already included that block, but reference and string scans only looked from the entry onward, and parameter inference took the lowest-address block as the entry, so a register set by the real entry could become a false parameter while the real input disappeared. Reference scans now cover the address range of all of the function's body blocks, and parameters are read from the block at the function's actual entry.
2026-11-11 13:11:26 +07:00
Afloat 2897b15894 Keep capped byte-search results in global file-offset order (R3.11) (#1609)
core byte search ran its hex, UTF-8 and UTF-16LE queries in turn against one shared 100,000-match allowance, so a stream of later hex matches could use it up before an earlier text match was considered, and sorting afterwards couldn't bring that match back. Each query now keeps up to the cap, the results are merged in file-offset order and cut to the cap, and the result says when the cap was reached.
2026-11-11 12:39:51 +07:00
Afloat d4a39569e3 Report incomplete firmware archive member scans (R3.12) (#1607)
ZIP, tar and cpio readers can stop their member listings early, but firmware extraction ignored their truncation flags, so directory entries could use up the member limit and later files were left out while the result reported complete coverage. A cut-short member listing, in any region or nested archive, now marks the extraction truncated with a limitation saying what to raise or inspect.
2026-11-11 12:39:39 +07:00
Afloat 2fb99e2ba3 Keep nested ZIP members inside the outer firmware archive (R3.12) (#1606)
A ZIP stored inside a firmware ZIP member could supply the first plausible end record, so the scanner cut the outer archive short at the inner one: extraction left out outer members and wrote the inner contents at the wrong path. Each end record and central directory is now matched to the archive whose extent it describes, so a nested ZIP stays a member of the outer one and its siblings are all extracted.
2026-11-11 12:39:34 +07:00
Afloat a67ba2caa9 Bound firmware ZIP decoding by the remaining output budget (R3.12) (#1605)
Firmware extraction decoded ZIP members into a queue before charging their output bytes, so each member got the same remaining budget and a small compressed archive could hold many times the output limit; a member that hit the decode limit also left the truncation flag unset. Paths and the remaining file and byte limits are now checked before a member is decoded, each member is decoded only up to what's left, and a member stopped by the limit marks the extraction truncated.
2026-11-11 12:38:25 +07:00
Afloat 0028b7cbd8 Reuse recovered filesystem bytes during firmware extraction (R3.12) (#1604)
Filesystem recovery already owns each extracted file's bytes, but firmware extraction copied them into its output queue and kept the originals, so a large recovered file took two full copies in memory before it was written. The recovered buffers are now moved into the queue. Path checks, byte and file limits, nested scans and the report are unchanged.
2026-11-11 12:38:18 +07:00
Afloat f57fa23780 Disclose incomplete asset catalog tree reads (R3.12) (#1603)
A truncated asset catalog tree or node header could give no entries and no warning, and apple_assets_list then reported a complete empty listing; other interrupted tree walks kept what they read but called the result complete. Tree completeness is now tracked through the headers, child and leaf links, missing blocks and walk limits. Readable entries are kept, and an incomplete tree marks coverage partial, sets tree_incomplete and says so in the summary. Legal empty trees still read as complete.
2026-11-11 12:36:40 +07:00
Afloat 150fabc9c0 Apply keyed archive pagination before copying object rows (R3.12) (#1602)
apple_archive_decode built every object row before paging and copied a shared class name once per object while counting classes, so a 97 KB archive with 1,024 objects sharing one 64 KiB class name held 64 MiB of class text even when one row was asked for. Only the requested rows are built now, and class names are borrowed from their shared class object while the class counts are taken. Totals, order, offsets, limits and the output shape are unchanged.
2026-11-11 12:33:30 +07:00
Afloat 893134c342 Bound expanded ASAR paths and say when an extraction is incomplete (#1558)
ASAR entry and depth limits didn't bound the combined size of expanded paths: a compact directory tree could repeat one long parent prefix across thousands of short names, and a valid 1.5 MB archive kept 145 MB of path text. Expanded entry paths and rejected names now share an 8 MiB budget, checked before each path is built; when it runs out, the entries read so far are kept and the listing is marked truncated. core_archive_extract used to ignore a truncated listing and call the extraction complete; for ASAR and ZIP it now extracts what was listed, adds a limitation that the listing was cut short, and marks coverage partial with no claimed total. The JavaScript app analysis carries the same flag.
2026-11-11 02:22:14 +07:00
Afloat db9dd54e47 Keep incomplete Android manifests partial in tool evidence (R3.12) (#1535)
The binary XML reader marks a recovered or capped manifest as truncated, but android_package_show dropped that flag and called its evidence complete, counted by the APK's ZIP entries, even when the manifest was missing or unreadable. android_components_list also reported complete coverage on the last page of a recovered manifest. Package evidence is now complete only when the manifest read in full, and component pages of a truncated manifest stay partial, with no claimed total and next_offset kept for paging.
2026-11-11 00:07:52 +07:00
BFlat 4390e97e60 Stop Ghidra when the app closes, and skip the analysis of an Electron program's runtime (#1007)
Closing the app stops analyses and waits for them to end. A Deep build no longer waits on Ghidra for an Electron program, whose logic is in `app.asar`.

Closes #946.
Closes #947.
2026-11-07 01:46:35 +08:00