Commit Graph
2792 Commits
Author SHA1 Message Date
morluto 13613a0476 docs: group guides by task and consolidate verification links 2026-11-19 20:47:23 -05:00
morlutoandCursor Agent 63029a8c8a docs(testing): document the supervised verifier command and run helpers (#12654)
Name the verifier command owner, run helpers, and cleanup order so new
verifier scripts do not start compilers, readers, or the REA CLI with bare
execFile.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:46:23 -05:00
morlutoandCursor Agent e5b91f60ef docs: correct a moved LZ4 path and a nonexistent script example (#12651)
Keep the audited-base citation of src/gpu/Lz4Block.ts and record the
current src/compression/Lz4Block.ts location. Point the obligation-ledger
verifier example at an existing MCP cancellation test.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:46:12 -05:00
d53f87d6d8 docs(specs): index unlisted feature records and define when a record is required (#12650)
List the six feature records missing from the spec index, drop the open
ReFS owner-review task now that admission is on main, and state when a
record is required.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 20:46:03 -05:00
morlutoandCursor Agent e532d746f0 docs(limits): refresh the limit inventory and state the runtime-setting rule (#12655)
* docs(limits): refresh the limit inventory and state the runtime-setting rule

Recompute the inventory from ANALYSIS_SETTINGS and the numeric-limit
check, and make a hardcoded limit a runtime setting unless a fixed
ceiling has a stated format, protocol, or representation reason.

* docs(limits): distinguish runtime settings from per-call overrides

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-20 01:43:07 +00:00
吴佳浩Albenandmorluto ea4baaf6de fix(v8): read the code cache header size from the container (#10279)
* fix(v8): read the code cache header size from the container

V8 sizes the header with `kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)` and
`kUnalignedHeaderSize` is 28, so the header is padded *after* its words: a 64-bit producer writes
32 header bytes and a 32-bit one writes 28. The reader pinned 32 and required the declared payload
to equal `bytes.length - 32`, so every container from a 32-bit producer failed as "truncated or
corrupt".

Measured here on Node 24.22.1 (V8 in x64): take a real cache and drop the four alignment bytes at
offset 28. V8 loads it unchanged — `cachedDataRejected === false` — while the reader refused it:

    before: Header declares a 392-byte payload but 388 bytes follow the 32-byte header
    after:  ACCEPT header_bytes=28 words=7 payload.offset=28

The payload-length word sits at byte 20 in both layouts, so the declared length already states how
much trailing padding the container carries. The header size is derived from it now: `28` and `32`
are admitted, the reported word table covers exactly the header the container holds (7 or 8 words),
and the schema requires that table to agree with `header_bytes`.

Nothing is loosened. A header that is neither 28 nor 32 bytes is still `malformed`, and the
16 existing cases pass unchanged — dropping only the derivation back to the constant fails exactly
the new narrow-header case.

`src/v8` — 26 passing. `npm run lint` and `tsc --noEmit` clean.

* fix(v8): refuse a wide cache that is only four bytes short

A review finding on the previous commit, and a real one: deriving the header size from the declared
payload length makes a 32-byte-header container truncated by four bytes resolve to 28, because
`bytes.length - declaredPayload` loses exactly those four bytes. The reader then accepted a
truncated cache and read its payload one word long.

The wide header's last word is `POINTER_SIZE_ALIGN` padding that V8 leaves zero, and a narrow
container has payload where that word sits. Measured on Node 24.22.1 across six different sources:
the padding word is always `0x00000000` and the first payload word is always non-zero. So the zero
word is the only evidence that separates the two, and it is now required to be non-zero for the
28-byte layout:

| container | before this commit | after |
| --- | --- | --- |
| real 32-byte header | accept | accept, `header_bytes=32` |
| real 28-byte header | accept | accept, `header_bytes=28` |
| 32-byte header truncated by 4 | **accept** | refused as `malformed` |

The guide also described one pinned 32-byte header; it now describes both layouts, how the size is
resolved, and why an ambiguous container is refused.

`src/v8` — 27 passing. Removing the guard accepts the truncated container again.

* fix(v8): read the padding word through the header accessor

A Static checks finding: `verify/architecture-guards.mjs` counts raw Buffer reads in parser folders
and allows only a shrinking baseline, and the previous commit added one:

```
raw Buffer or DataView numeric read (use BinaryReader ...); new copies are not allowed:
  src/v8/V8CodeCacheParser.ts: 2 (baseline 1)
```

The read is the narrow-header discriminator — the alignment word a 64-bit producer leaves zero at
offset 28. It now goes through the file's existing `field(index)` accessor instead of calling
`bytes.readUInt32LE` directly, so the count returns to the baseline while the check itself is
unchanged: `field(7)` is byte 28, and `V8_CODE_CACHE_NARROW_HEADER_BYTES / 4` spells that index.

`node scripts/verify/architecture-guards.mjs` — passed across 2 843 source files.
`src/v8` + `tests/boundary/rust` — 68 passing. `tsc --noEmit` 0 errors.
Setting the condition to `false` fails "refuses a wide container that is only four bytes short",
so the check is still load-bearing.

* fix(v8): ground the narrow-header rule in the producer, and test the word table

Two review findings.

**The rule was stated as measurement, not as format.** The previous comment justified the zero-word
discriminator with "measured on Node 24.22.1 every real payload begins with a non-zero word", which
makes support for other producers depend on one host. The producer zeroes that padding rather than
copying payload over it: `SerializedData::AllocateWithPayload` in `src/snapshot/snapshot-data.cc`
runs `std::fill_n(data_, header_size, 0)` before writing any header word, and
`kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)` in `src/snapshot/code-serializer.h` puts the
four padding bytes inside `header_size`. So a zero word at byte 28 is a fact about the producer, not
about one Node build.

The refusal is now worded as the reservation it is: a narrow container whose payload happened to
begin with four zero bytes would match the same test, and no reading of the header alone separates
the two cases. The message says both readings instead of asserting corruption.

**The word-table rule had no test that could fail.** `header.fields.length * 4 === header.header_bytes`
cannot disagree on a parsed container — the parser derives both from `payloadOffset` — so it is only
reachable through the schema, which is what a stored or projected report also goes through. The new
case builds four reports directly: seven words with 32 bytes and eight words with 28 are refused on
`header.fields`, while the two consistent pairs are accepted. Setting the rule to `false` fails it
with `7 words / 32 bytes: expected true to be false`.

`node scripts/verify/architecture-guards.mjs` — passed across 2 843 source files.
`src/v8` + `tests/boundary/rust` — 69 passing. `tsc --noEmit` 0 errors, `npm run lint` 0 errors.

* refactor(v8): share decoded code cache header words

* fix(v8): validate narrow header evidence without assuming runtime compatibility

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-20 01:41:01 +00:00
morlutoandCursor Agent 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>
2026-11-19 20:34:52 -05:00
morluto ed336bd31c fix(ghidra): retain DOS images with order-dependent fixups (#12649) 2026-11-20 01:29:50 +00:00
3cfe8480c5 fix(elf): decode a 32-bit prpsinfo whose ABI gives pr_uid 32 bits (#10189)
* fix(elf): decode a 32-bit prpsinfo whose ABI gives pr_uid 32 bits

`decodeCorePrpsinfo` assumed every ELFCLASS32 core carries the i386/ARM `struct elf_prpsinfo`:
16-bit `pr_uid`/`pr_gid` and a 124-byte descriptor.

`pr_uid` is `__kernel_uid_t`, and its width is an ABI property, not an ELF-class one. Only
`arch/x86/include/uapi/asm/posix_types_32.h` and its ARM/m68k/sparc counterparts narrow it to
`unsigned short`; everything else takes `asm-generic/posix_types.h`'s `unsigned int`, so MIPS o32,
PowerPC-32, s390 and `compat_elf_prpsinfo` (`include/asm-generic/compat.h`:
`typedef u32 __compat_uid_t`) write a 128-byte struct with every member after `pr_flag` four bytes
later.

Reading a 128-byte descriptor with the 124-byte offsets published wrong values rather than null.
Measured through `parseElfNotes`, with `uid 70000, gid 80000, pid 4242, fname mips-proc`:

    before: {"pid":80000,"ppid":4242,"pgrp":1,"sid":4242,"uid":4464,"gid":1,
             "filename":"\u{10}","psargs":""}
    after:  {"pid":4242,"ppid":1,"pgrp":4242,"sid":4242,"uid":70000,"gid":80000,
             "filename":"mips-proc","psargs":"./mips-proc --serve"}

`pid` came out of the middle of `gid` and the two text fields came from the wrong offsets
entirely.

The kernel writes `sizeof(*psinfo)` as the descriptor — `fs/binfmt_elf.c`:
`fill_note(&info->psinfo, PRPSINFO, sizeof(*psinfo), psinfo)` — so the declared length already
carries the distinction and no machine table is needed. The 32-bit id width is now
`descriptor.length >= 128 ? 4 : 2`, and `pr_pid`/`pr_fname`/`pr_psargs` are derived from it. The
124-byte and 136-byte decodes are unchanged; the second new case pins that.

`src/native/elf` and `src/domain/native` — 535 passing. Forcing the 16-bit layout fails the new case.

* test(elf): produce the 32-bit prpsinfo layout from the shared note builder

Review finding: the regression hand-encoded a second NT_PRPSINFO layout while `corePrpsinfoNote` is
the repository's producer for this format, so nothing else could represent the MIPS/PowerPC/s390
ABI and the two encodings could drift.

`corePrpsinfoNote` takes `idWidth: 2 | 4` now. It allocates 124 or 128 bytes from it, writes
`pr_uid`/`pr_gid` at that width, and derives `pr_pid` through `pr_psargs` from `8 + idWidth * 2`
instead of the fixed 12/28/44 offsets. The option is ignored for a 64-bit image, whose layout is
fixed at 136.

Both new cases build their descriptor through the producer, so the test no longer carries offsets
the fixture does not know about.

* test(elf): drop the duplicate 124-byte prpsinfo case

The previous commit's rewrite left the original hand-built 124-byte block in place, so the same
regression ran twice — once through `corePrpsinfoNote`, once with the offsets written out again.
Keeping both is exactly the drift the shared producer was supposed to end.

* fix(elf): preserve SuperH PRPSINFO decoding

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: wunianze666-netizen <wunianze666@gmail.com>
2026-11-20 01:23:27 +00:00
morluto 78fdc7ecf7 fix(gradle): disclose unfamiliar metadata revisions (#12648) 2026-11-20 01:22:36 +00:00
morluto d68f6207cd fix(nuget): recognize license types case-insensitively (#12643) 2026-11-20 01:20:01 +00:00
morluto 5664a6fbd4 docs: clarify parser coverage and verification ownership 2026-11-19 19:42:28 -05:00
Nianze Wuandmorluto 46f6d4638e fix(windows): check fixed Shell Link ExtraData sizes (#10361)
* fix(windows): check fixed Shell Link ExtraData sizes

* fix(windows): preserve unreadable shortcut target uncertainty

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 19:21:37 -05:00
RRFZ 0fcace1ad1 fix(nuget): select publisher metadata from the first eligible leaf (#12603) 2026-11-19 19:20:10 -05:00
0e0c5a8fea feat(ghidra): admit ELFv2 PPC64 executables through a Power ISA 3.0 lane (#12517)
* feat(ghidra): admit ELFv2 PPC64 executables through a Power ISA 3.0 lane

An EM_PPC64 ELF has been classified in the powerpc family since #12089, but
the Ghidra lane still refused every ELF64 file. It now admits ELF64 ET_EXEC
files that declare the ELFv2 ABI, little or big endian, and imports them with
PowerPC:LE:64:A2ALT or PowerPC:BE:64:A2ALT by byte order.

Ghidra's 64-bit "default" languages decode the G2-era instruction set and
stop at the first VSX instruction in POWER8 or POWER9 code; the A2ALT
languages are Power ISA 3.0 and decode it. The ELF loader selects A2ALT
today, and the lane passes it explicitly and records it as provider-pinned.

ELFv1 (.opd function descriptors), an undeclared ABI, other e_flags bits,
ET_DYN and ET_REL are refused with their own reasons. The 32-bit lane is
unchanged.

npm run verify:ghidra:ppc64 builds a source-owned ELFv2 fixture in both byte
orders and checks it against GNU readelf and real Ghidra through MCP and the
CLI: the bound language, fixed instruction bytes including a VSX xxlor, the
global-entry thunk to each function's local entry, direct calls, snapshot
identity, and a shared object refused before Ghidra starts.

Refs #12085

* fix(ghidra): supervise PPC64 verifier compiler and CLI processes

Timeouts on bare execFile stop only the direct child, so a linker can
outlive Clang and disappear from the parent-tree cleanup check. Launch
those commands through the shared command owner, pass that runner into
the PPC64 fixture builder, and close the owner before the lineage check.
A failed close stays registered for retry and the diagnostic workspace
is retained.

* docs(ghidra): record the PPC64 ELFv2 Power ISA 3.0 lane

Add the feature specification, plan, and tasks for the lane, and index
them with the other feature records.

* fix(ghidra): finish shared PowerPC verifier command ownership

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 18:27:31 -05:00
morluto 57d1d7ca5e fix(uefi): preserve parser coverage and source evidence (#12539)
* fix(uefi): report malformed volume extension metadata

* fix(uefi): preserve parser coverage and source evidence

* fix(uefi): bound inventory and tighten parser framing

* refactor(uefi): reuse shared byte formatting in diagnostics

* fix(uefi): accept extended sections at the compact size marker
2026-11-19 22:34:06 +00:00
morluto 9d0502bc51 fix(uefi): share inspection and extraction scan limits (#12538)
* fix(uefi): share inspection and extraction scan limits

* test(uefi): prove extraction honors the FFS file limit
2026-11-19 22:05:16 +00:00
morluto 745869e707 fix(uefi): account for FFS alignment bytes (#12532) 2026-11-19 21:41:42 +00:00
bartman081523andmorluto d380dc2409 feat(uefi): add pure-TypeScript UEFI firmware analysis tools (#12342)
* feat(uefi): add pure-TS UEFI firmware volume/FFS parser with inspect/extract tools

Add a dependency-free rea-uefi provider that maps AMI/Aptio flash images:
- inspect_uefi_firmware: aligned _FVH discovery, volume-relative FFS walking,
  guided section/compression classification, conservative PSP-directory probing,
  embedded-volume rescan and leftover-region classification; incremental SHA-256
  and explicit integrity notes.
- extract_uefi_firmware: whole-image/volume/FFS-file/section extraction with
  LZMA-custom/LZMAF86 and AMD-zlib decoding, SafeOutputTree staging, derivations
  and extraction_gaps.
- UefiArtifactReader + 'uefi' format wiring across inventory/domain/contracts
  so parsed volumes and extracted PE32/TE files hand off to deep-provider
  analysis (open_binary -> Ghidra).

* feat(uefi): add inspect_uefi_nvram for AMI NVRAM variable stores

Add a pure-TypeScript tool that maps the vendor AMI NVRAM variable stores
(factory-default "StdDefaults" and peers) inside a flash image:
- scan the raw image for NVAR entry chains ("NVAR" + u16 total size +
  u32 attribute 0x8[23]FFFFFF + state + NUL-terminated name + data),
- recurse into a container entry whose data is itself an NVAR chain, so the
  StdDefaults setup variables surface as depth/parent_offset rows,
- report attributes, state, data range, SHA-256 and trailing padding per entry.

Verified against B550 AORUS Elite V2 FId: one StdDefaults store at 0x37090 with
the 11 expected nested variables (Setup, PlatformLang, AMITSESetup, XhciDID,
GcSensorVarName, PCI_COMMON, SioSetupData, UsbSupport, NetworkStackVar,
SecureBootSetup, Setup). Exposed as MCP tool and inspect-uefi-nvram CLI command.

* fix(uefi): address review on checksums, compression, guided sections, NVRAM bounds

- FFS file checksum: verify the two's-complement invariant (payload sum +
  stored byte == 0 mod 256) instead of comparing sums, and encode the correct
  complement in the fixture builder.
- Compression sections (type 0x01): use the 9-byte header and classify EFI
  standard compression instead of 'none', so extraction reports a gap rather
  than publishing compressed bytes as a raw section.
- GUID-defined sections: derive GUID/data-offset/attributes from the parsed
  common header size (compact or extended) and reject out-of-range payload
  offsets.
- AMI NVRAM: bound recursive chains to the enclosing container's data end and
  report partial coverage when a valid nested chain is cut by max_depth.

* fix(uefi): bound decode memory, serialize operations, enforce deadline, mark truncation

- LZMA worker: enforce max_output_bytes while decoding through a bounded output
  sink, so an oversized stream is rejected during expansion instead of after a
  full decompression plus a second Buffer copy.
- Provider: serialize admitted operations (the promised single decode-worker
  lane must not become one worker per overlapping call) and apply one
  whole-request deadline that covers every decode stage, not a fresh per-stream
  timer. close() drains the queue and the resource scope.
- Scan: track truncated sections of known type and report coverage partial
  instead of complete when a section declares more bytes than are present.

* fix(uefi): cancellable queue, timeout surfacing, availability and reader omissions

- Queue: check the caller signal before enqueue and when a job reaches the head,
  and race the queued promise against abort so a cancelled wait returns
  immediately instead of blocking behind the active request.
- Deadline: track the internal deadline and return AnalysisTimeoutError instead
  of the AnalysisCancelledError that runOwnedCommand reports for any external
  abort, preserving the real failure reason for CLI/MCP callers.
- CapabilityInventory: treat inspect_uefi_nvram like the other bundled rea-uefi
  tools so discovery does not demand Unblob for it.
- UefiArtifactReader: report image truncation through onOmission so inventory
  coverage reflects the unread suffix even when no volume was found.

* fix(uefi): limit early cancellation to unstarted jobs and preserve timeout cleanup

- #raceWithAbort only returns early for jobs that have not started; once a
  request is running, await it so worker cleanup and completed output are
  preserved instead of being discarded by a bare cancellation.
- Reclassify a deadline-induced cancellation as AnalysisTimeoutError while
  keeping its cause and cleanup observations, and never override a different
  primary failure.

* docs(licenses): record UEFI decoder dependency notices

* fix(uefi): preserve stream provenance and bound firmware analysis

* feat(uefi): decode LZMAF86 guided sections

* fix(uefi): validate publication before commit and order decoder cleanup

* fix(uefi): preserve unsupported volumes and extraction gaps

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 21:19:35 +00:00
morluto 3dfd7c2f0d fix(elf): preserve unprefixed Kconfig hex values (#12516) 2026-11-19 20:53:49 +00:00
David Muñoz Reyandmorluto cd3590c8ee feat(artifacts): inspect NES 2.0 container headers and regions (#10674)
* feat(artifacts): inspect NES 2.0 container headers and regions

Problem: the iNES lane refused every header whose byte 7 bits 2-3 select
NES 2.0, so NES 2.0 cartridges could not be inventoried, extracted or
reconstructed even though their file layout extends classic iNES.

Fix: the single iNES-family header parser now reads NES 2.0 alongside
classic iNES. It reports the 12-bit mapper, submapper, 12-bit and
exponent-multiplier PRG/CHR sizes, declared PRG/CHR RAM and NVRAM sizes,
CPU/PPU timing, console type with Vs. System and extended console codes,
miscellaneous ROM count and default expansion device in a "nes-2.0"
header variant; classic headers keep their exact serialization. Regions
add one prg.bin/chr.bin for exponent sizes and misc-rom.bin for the bytes
after CHR-ROM when miscellaneous ROMs are declared. Oversized
declarations (with exact totals, including exponent sizes beyond safe
integers), nonzero unused header bits, empty PRG-ROM and declared but
absent miscellaneous ROM bytes are refused through the existing format
error. Nested byte classification now admits NES 2.0 through the same
parser. The reader limitation, tool description, guide and skill
reference now state that UNIF remains unsupported and that RAM, timing
and console values are declarations.

Validation: new synthetic NES 2.0 unit cases fail on the base (15 of 24)
and pass after the change; focused boundary and acceptance iNES suites
(75 tests) pass, including NES 2.0 inventory, extraction, reconstruction
and compiled CLI inspection; npm run check:fast passes.

Refs morluto/rea#2072

* test(artifacts): extract an exponent-sized NES 2.0 ROM area

Review follow-up for NES 2.0 headers.

The exponent-multiplier case stopped at parseInesLayout, and the
extraction test used counted ROM units, so prg.bin and chr.bin from
an exponent-sized area never went through the reader or extraction.
A boundary case now builds a NES 2.0 file with a 2^10 * 3 byte PRG-ROM
area beside one counted 8 KiB CHR-ROM unit. It checks the header omits
the PRG unit count, the source offsets of prg.bin and chr/000.bin,
the verified reconstruction order, and that the extracted regions
match the original bytes exactly.

Tests: tests/boundary/filesystem/inesArtifact.test.ts passes (38).

* refactor(artifacts): read NES header bytes through one helper

The NES 2.0 declaration added a sixth raw Buffer read to
inesContainer.ts. On current main the architecture guard allows five
there, so the merged tree failed Static checks. iNES and NES 2.0
declarations and the format probe now read header bytes through one
headerByte helper. The file has one raw read, and its counted baseline
drops from 5 to 1 through --shrink-baselines.

Tests: inesContainer domain tests (24) and the NES boundary and
acceptance tests (76) pass. architecture-guards, format:check and
check:ci:fast pass on the branch merged with main.

* refactor(artifacts): report iNES header failures through ParseFailure

Review follow-up: the NES 2.0 declaration added plain-string failures.
The iNES-family parser now returns Result<_, ParseFailure> with its
kind and where it was found:
- malformed: a missing signature, a dirty legacy header, an empty
  PRG-ROM area, reserved NES 2.0 bits or an invalid file extent;
- truncated: a short header, a short payload, or declared
  miscellaneous ROM with no bytes;
- unsupported: UNIF or another header variant, with undecoded content.
The detail text is unchanged.

The format registry refuses with the detail, and the iNES reader and
root classifier translate the failure at their boundary into the
existing format ArtifactReaderFailure, with the ParseFailureError as
its cause.

Tests: the refusal table now asserts each failure's kind and format
as well as its detail. iNES domain and recognition tests, NES boundary
and acceptance tests (76), architecture-guards, format:check and
check:ci:fast pass on the branch merged with main.

* fix(artifacts): preserve NES header declarations and iNES evidence

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 20:49:33 +00:00
morluto 1ec32721af test(pe): pin stored resource name ordering (#12518) 2026-11-19 20:45:29 +00:00
morluto e46ace9744 fix(python): disclose inactive pyc check-source flags (#12508) 2026-11-19 20:20:31 +00:00
morluto 7ad140b5a1 docs(desktop): clarify Unity Mono evidence scope (#12509) 2026-11-19 15:17:12 -05:00
morluto 77d2c62d4d fix(nuget): require the OPC namespace for manifest relationships (#12492) 2026-11-19 19:45:53 +00:00
7fd50eb361 fix(zstd): share exact-frame Zstandard decoding across ELF and OTA (#12416)
* fix(zstd): share exact-frame Zstandard decoding across ELF and OTA

Walk RFC 8878 frames once so ELF sections, Android OTA REPLACE_ZSTD, and GPU payloads reject truncated headers, blocks, checksums, and trailing bytes on every supported Node runtime. Bound that walk with the runtime zstd.max_frames setting.

* fix(zstd): keep frame output tight and report GPU frame-cap refusals

Copy each Node 22 frame off its decoder chunk before the next frame is decoded. Map a GPU zstd.max_frames refusal through the resource-limit contract instead of a provider failure.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): keep frame-cap refusals and bad seeds out of malformed results

Project zstd.max_frames through one resource-limit helper for ELF notes, DWARF, GPU, and artifact reads. An invalid REA_ZSTD_MAX_FRAMES seed stays a configuration failure, and frame-header tests cover content size, window, dictionary id, and RLE blocks.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield GPU frame decoding so cancellation can land

The frame-by-frame fallback awaits a caller pause before each data frame. GPU yields and checks the read signal there, so a many-frame payload does not finish before a disconnect is observed.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): advertise the frame cap and keep strict GPU decode cancellable

List every operation that enforces zstd.max_frames, including GPU, DWARF, and ELF notes. The strict sequence uses the async decoder and checks the caller signal again after it returns, and a single output buffer is not copied a second time.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): refresh analysis-setting schemas and GPU frame-cap projection

Regenerate the advertised input summaries for inspect_analysis_settings and update_analysis_settings. GPU inventory now throws the projected zstd.max_frames resource limit from payload decode and #retainFailure, so the adjustable setting survives the public failure.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* style(gpu): format the frame-cap projection throw

oxfmt keeps the zstd.max_frames throw in #retainFailure on one line so CI format:check matches the local formatter.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield after the last frame-by-frame GPU decode

The fallback returned success in the same turn as the final synchronous frame, so a queued abort was still invisible to the caller's signal check. Pause once more before that success, matching the strict sequence.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): yield ELF, OTA, and DWARF frame decoding on the caller signal

The synchronous frame loop ignored abort signals owned by inspect_elf_notes, inspect_dwarf_units, and Android OTA partition reads. Those callers now use the cooperative decoder and yield before Zstandard work, and 32-frame cancellations cover each path.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): observe cancellation during structural parsing

* fix(zstd): project section-name frame caps at the ELF directory boundary

readElfDirectoryFromBuffer now requires the caller's operation and throws the adjustable zstd.max_frames resource limit. Hardening, unwind, and the other directory consumers keep that typed refusal instead of an adapter or I/O error.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(zstd): preserve optional ELF evidence when frames are capped

* fix(zip): validate Zstandard members through frame completion (#12461)

fix(zip): require complete Zstandard member frames

* fix(elf): yield hardening section name decoding

* fix(elf): yield section names for unwind and export reads

* fix(zstd): yield ELF directory reads that already own a cancellation signal

Hardening, unwind, initializers, exports, kernel modules, debug link, and Android JNI now read section names through the cooperative directory when their caller has a signal. Readers with no signal stay synchronous.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(elf): share one initializer directory and retain its snapshot

* fix(android): reuse the admitted JNI ELF directory

* fix(elf): retain optional debug candidate evidence through cooperative decoding

* fix(zstd): yield ELF section names for Go, Rust, and IL2CPP

These inspections already own an abort signal. Their ELF directory read now uses the cooperative container decoder so a queued cancellation can land during a many-frame section-name table.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(elf): recognize compressed kernel modules before ELF decoding

The cooperative module reader decoded the bytes as ELF before the container check, so gzip, xz, and zstd modules became malformed images. The compression check now returns the unsupported-container report first.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* refactor(elf): classify each container once before reading it

* fix(il2cpp): preserve admission order during cooperative linking

* fix(elf): reuse section-name decoding in debug-link comparison (#12472)

* style(elf): format updated section-reader test calls

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 19:45:26 +00:00
morluto 93f4c3749f fix(ci): select the managed pointer integration tests for row changes (#12486) 2026-11-19 19:31:54 +00:00
morluto cd331e7b04 fix(gradle): admit module metadata from its root version marker (#12488) 2026-11-19 19:28:12 +00:00
morlutoandStefano Rizzello 673bd049b7 fix(flutter): inspect unified Dart AOT snapshot profiles (#12480)
* fix(flutter): inspect unified Dart AOT snapshot profiles

Port the unified Dart SDK layout from #3662 and resolve profiles from one dynamic-symbol inventory and the physical snapshot headers. Refs #3629.

Co-authored-by: Stefano Rizzello <rizzellostefano@gmail.com>

* fix(flutter): retain valid pools beside malformed snapshot exports

---------

Co-authored-by: Stefano Rizzello <rizzellostefano@gmail.com>
2026-11-19 19:22:54 +00:00
morluto 18abd3221a fix(erlang): validate admitted BEAM atom framing before capacity (#12484) 2026-11-19 19:21:08 +00:00
a836c89d75 fix(artifacts): preserve iNES shutdown ownership and I/O failures (#11748)
* fix(artifacts): preserve iNES shutdown ownership and I/O failures

* test(cli): publish complete doctor readiness before cancellation

* test(mcp): observe cleanup failures at their current delivery boundary

* fix(mcp): preserve workflow completion progress through delivery

* test(ci): assert current MCP and evidence ownership contracts

* test(setup): keep the Windows Kimi profile fixture on a supported profile

The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.

The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.

Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.

* test(ci): restore verifier and MCP contract regressions

* test(captures): assert adapter-owned input issue field names

* fix(ghidra): avoid Java probes for missing installations

* test(capture): retain final cleanup progress assertions

* fix(artifacts): keep iNES shutdown ownership free of unrelated edits

The doctor readiness fixture and process-capture progress assertions
are not required by descriptor retirement or I/O failure precedence.
Restoring them, and the Ghidra installation test already merged in
#11732, leaves this change on the iNES reader, chunk reader, and
their regressions. The unused artifact chunk helper import is removed.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(artifacts): age the iNES header race before same-size rewrites

Identity checks observe mtime, and a same-size overwrite inside one
clock tick is indistinguishable from the original file. The admission
test then reports a format error instead of source integrity. Age the
fixture the same way the prefix race already does.

* test(go): assert truncated Mach-O command tables by typed failure

An unstored oversized command table is a truncated Mach-O load-command
parse, projected as invalid_format. The old message lock named a
sentence the parser no longer produces.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(artifacts): fold the paused iNES inventory close into the existing case

The standalone close test repeated the paused entries() refusal already
covered by the close/cancel pair. The borrowed-descriptor stat stays on
that close case.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(artifacts): preserve first iNES stream interruption

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: g0at <50488370+g1at@users.noreply.github.com>
Co-authored-by: IvenKooLab <276572622@qq.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>
2026-11-19 19:19:32 +00:00
morlutoandCursor Agent 7df462cbfa feat(managed): retain unresolved definition coordinates (#12462)
* feat(managed): retain unresolved definition coordinates

* fix(managed): describe unresolved definition scope in summaries

* test(managed): isolate the selected coordinate fixture

* test(managed): use owned member scope guidance

* test(managed): use historical evidence for unknown method scope

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 19:03:27 +00:00
morluto 8349201627 fix(elf): report empty kernel module signature ranges as malformed (#12471) 2026-11-19 18:39:07 +00:00
morluto 82fa175d2f fix(managed): refuse empty field definition identities (#12467) 2026-11-19 18:27:36 +00:00
morluto a627952bd5 fix(native): preserve numeric Mach-O identities and CodeView path bytes (#12458) 2026-11-19 18:12:35 +00:00
morluto 71f5a12ad8 fix(desktop): preserve Linux launch, title, and package source facts (#12455) 2026-11-19 18:06:09 +00:00
morluto 2837de5159 fix(har): retain Playwright 1.64.1 bracketed IPv6 addresses (#12456) 2026-11-19 18:04:38 +00:00
morluto 3d763126cc fix(node-sea): read blobs with a declared main code format (#12454) 2026-11-19 18:03:19 +00:00
morluto a3759e714e fix(debuggers)!: preserve exact Cutter output and GNU MI escapes (#12457) 2026-11-19 18:02:31 +00:00
morluto 16e3263b10 fix(pe): bound TLS and export reads by declared section content (#12432)
* fix(pe): bound TLS template mappings by section content

* fix(pe): map export tables within declared section content (#12444)
2026-11-19 18:00:01 +00:00
morluto c84fde05e3 fix(website): resolve authored links and verify documentation routes (#12453) 2026-11-19 17:56:20 +00:00
morluto 4377c1a392 fix(managed): keep empty definition names out of member identity (#12448) 2026-11-19 17:51:46 +00:00
morluto 760478c5e9 fix(managed): retain Module identity when its name is unreadable (#12441)
fix(managed): retain module identity when its name is malformed
2026-11-19 17:47:18 +00:00
morluto 7cc7bda6e3 fix(android): validate OTA manifest and signature extents before capacity (#12431)
fix(android-ota): admit complete manifest and signature extents before limits
2026-11-19 17:22:55 +00:00
ebd709cef5 fix(esp): disclose partition entries outside the table checksum (#12384)
* fix(esp): disclose partition entries outside the table checksum

* fix(esp): label the partition checksum offset origin

* fix(esp): count partition entries outside the table MD5

The coverage warning was only prose, and it presented the MD5 entry's
table-relative offset without a structured fact. Record
entriesAfterChecksum on the MD5 result, project it as
entries_after_checksum, and keep the warning as presentation.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(esp): accept saved flash inventories without the checksum count

A required entries_after_checksum rejected ESP flash Evidence written
before the field existed. Keep the count exactOptional so omission
stays unknown, and still emit it for new inventories.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 11:59:02 -05:00
8c3dbd99e1 fix(desktop): bind dconf profiles to selected database sources (#11161)
* fix(desktop): bind dconf profiles to selected database sources

* fix(desktop): resolve dconf before changing working directory

* fix(desktop): retain refused dconf lookup diagnostics

* fix(desktop): preserve execution-time dconf search fallback

* fix(desktop): keep host spawn failures outside dconf fallback

* fix(desktop): retain staged reader cleanup through command close

* test(kuna): await eviction boundary events explicitly

* test(kuna): bound lifecycle acknowledgements through shared owner

Cherry-picked shared follow-up from a5761c7545.

* fix(desktop): keep dconf sources independent of wrapper stdin

* test(desktop): restrict procfs command checks to Linux

* fix(desktop): own dconf wrapper cleanup before source retirement

* fix(desktop): retain dconf preparation inspection owners

* fix(desktop): classify dconf read failures by kind and errno

Record the failure kind, host errno, exit status, selected command, and
child stderr on DconfDump, and carry those facts to view_failure. Tests
assert the typed fields instead of error prose, including a PATH refusal
whose executable is not the last candidate.

* test(desktop): gate real dconf diagnostics on Linux

The real reader checks /proc file descriptors before launch, so macOS
reports descriptor-unavailable/ENOENT instead of launch-failed/EACCES.
Keep that launch refusal on Linux and cover the Evidence contract with
a mocked reader on every platform.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 11:40:08 -05:00
4491c84c82 fix(node-sea): bound duplicate blob verification work (#11736)
* fix(node-sea): bound duplicate blob verification work

* test(mcp): observe cleanup failures at their current delivery boundary

* fix(mcp): preserve workflow completion progress through delivery

* test(setup): keep the Windows Kimi profile fixture on a supported profile

The Windows-only case at `clientConfigurationEnvironment.test.ts:226` wrote
`rea_mcp_input_schema_profile: "full"`. That profile was retired: the reader
now refuses it ("REA_MCP_INPUT_SCHEMA_PROFILE accepts only \"compact\" …"),
so `configureClientConfiguration` returned `failed/readback` before writing
and the case failed on every Windows run, including main's own
`Windows capability and package lane`.

The case has no Windows dependency — it passes an explicit `configPath` and
the Kimi write dialect is the same everywhere — so it now runs on every
platform, which is what let the stale value rot unnoticed. The fixture keeps
the lowercase explicit key the case is about, with the supported value.

Verified on `main` `d6bcfc10`: the same fixture driven through
`configureClientConfiguration(..., "win32")` on this host reproduced
`{"status":"failed","reason":"readback"}` with the retired value and now
returns `{"status":"configured"}` with `compact`. The file's 75 cases pass
here (66 run, 9 platform-conditioned skips) and `check:fast` passes.

* test(ci): restore verifier and MCP contract regressions

* test(captures): assert adapter-owned input issue field names

* fix(ghidra): avoid Java probes for missing installations

* test(ghidra): drop duplicate absent-installation coverage

Merging main reapplied the #11732 case beside the copy already on main.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(node-sea): assert duplicate-blob refusal without stdout prose

The CLI coverage already checks the truncated code and limit details.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: ShuaixinHuang <197200901+ShuaixinHuang@users.noreply.github.com>
Co-authored-by: g0at <50488370+g1at@users.noreply.github.com>
Co-authored-by: IvenKooLab <276572622@qq.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 11:25:23 -05:00
morluto ed05170424 fix(mips): recognize unsupported Android relocation declarations (#12397)
fix(elf): retain Android relocation declarations in MIPS coverage
2026-11-19 15:37:21 +00:00
6a5d77bf21 fix(windows): floor LinkInfo string offsets at the mandatory header (#12403)
A LinkInfoHeaderSize below 0x1C no longer lowers the string-offset floor.
Reserved 0x1D..0x23 headers still end at their declared size, so ANSI
fields after that header stay readable.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 10:35:40 -05:00
morluto de9da86333 fix(windows): validate opaque shortcut block framing (#12401)
* fix(windows): check shortcut PropertyStore block size

* fix(windows): validate shortcut Shim block framing
2026-11-19 15:31:11 +00:00