Commit Graph
1584 Commits
Author SHA1 Message Date
FredApps c1098cb5b8 Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:57:08 +01:00
Afloat 3839858154 Verify RSA-PSS signatures using their declared parameters (R3.12) (#1565)
Certificate verification treated every RSASSA-PSS algorithm identifier as SHA-256 with a digest-sized salt, and CMS verification took its hash from the separate digest field, so a signature could verify despite conflicting hashes, salt lengths or key restrictions, while genuine SHA-384 signatures and other valid salt lengths were refused. The complete PSS parameters are now read (hash, MGF1 hash, salt length and trailer field) with the RFC 4055 defaults, and incomplete, repeated, out-of-order or unsupported parameters are refused with a reason. Verification uses the declared parameters, checks them against an RSA-PSS key's restrictions, and requires a certificate's signed and outer parameters to agree.
2026-11-11 01:56:55 +07:00
Cr f2c7a3ce00 Decode Swift lazy witness table cache variable symbols (R3.12) (#1564)
A Swift symbol ending in WL is the cache variable of a lazy protocol witness table and names a type and the conformance it's used with, like the lazy accessor Wl. The demangler took one operand for it and reported these symbols invalid ("N nodes left after decoding"). They now read as swift-demangle prints them: lazy protocol witness table cache variable for type T and conformance C. Wl and WL share one reader.
2026-11-11 01:56:49 +07:00
Afloat 1e962a5142 List Objective-C classes and categories once per address (R3.12) (#1559)
The Mach-O reader walks both the ordinary and the non-lazy Objective-C registration lists, and the compiler puts non-lazy classes and categories in both, so they appeared twice with their methods repeated. Each class and category is now listed once by its decoded address, in first-seen order. Two different definitions with the same name stay separate.
2026-11-11 01:56:40 +07:00
FredApps a50a6ba72d Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:56:11 +01:00
Afloat d777e0e1c4 Recover zero-filled cramfs hole blocks (R3.12) (#1566)
A cramfs hole has no compressed bytes: its end pointer repeats the previous block boundary. The reader handed that empty span to the zlib decoder and lost an otherwise valid file, which affected all-zero files, holes between data blocks and zero-filled tails. A block whose end equals its start now reads as zeros, sized to the rest of the file for the last block, within the existing per-file and total size budgets. Backward and out-of-image pointers are still corrupt, and compressed blocks must still decode to their exact length.
2026-11-11 01:55:51 +07:00
FredApps 709a75986d Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:48:46 +01:00
Afloat 7b0b082219 Read module formats in current Node SEA archives (R3.12) (#1562)
Node.js 25.7 writes a module-format byte after the exec-argument extension in a single-executable-application blob header. The reader knew only the three older layouts, so new CommonJS and ESM blobs both failed with "no known Node blob layout accounts for every byte", although their script paths, code, assets and arguments were all there, one byte further on. The new layout is now read, with its two defined values (CommonJS and module), and the listing reports module_format (null for older layouts, which don't store it). Complete-layout checks and the refusal of ambiguous blobs are unchanged. Tests use blobs made with the official Node.js 25.7 binary from small original scripts.
2026-11-11 01:48:09 +07:00
FredApps 1ee2dfc877 Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:46:54 +01:00
Afloat 3595efb4c2 Decode Unity ETC1 RGB textures (R3.9) (#1561)
Unity textures in format 34 (ETC_RGB4) were unsupported, so a readable asset whose first mip used ETC1 couldn't produce a picture. A new ETC1 decoder reads the 4x4 RGB blocks, covering individual and differential base colours, both subblock orientations, every modifier table and ETC1's column-major selector bits, and format 34 now uses it. First-mip sizing, the output pixel limit and edge cropping apply as for the other block formats. Truncated blocks and invalid differential colours are refused.
2026-11-11 01:46:32 +07:00
FredApps 5e5601be9b Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:43:11 +01:00
Afloat 935a079ff2 Account for copied Swift substitution nodes (R3.12) (#1560)
The Swift demangler limited the nodes it copied out of its substitution table, but saving a new substitution cloned the whole tree without charging that budget, so nested nominal and optional types in a small symbol could keep many overlapping trees; reusing a substitution also cloned it before checking the repeat count and budget. Saving a substitution now spends the node budget before cloning, and a reuse borrows the stored tree, checks the count and cost, then copies only what's needed. Ordinary nested types and repeated references still decode, and an oversized expansion is reported invalid with "symbol expands too much".
2026-11-11 01:42:20 +07:00
FredApps c9cbe70237 Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:37:35 +01:00
Afloat 9e393e42f2 Disclose WebAssembly metadata limits in both tool views (R3.12) (#1557)
After the WebAssembly reader began leaving out derived metadata once its byte budget is spent, formats_wasm_module_show still said lists stop at 100,000 entries even when the byte budget ran out much earlier, and its summary view left out the reader's truncated flag. The limitation now says lists or derived metadata are incomplete and points to the warnings for which limit was reached, and the summary view includes truncated as the complete view already did.
2026-11-11 01:36:50 +07:00
FredApps 583f41b5f3 Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:29:14 +01:00
Afloat febd46bf30 Decode Unity textures with unsigned 16-bit channels (R3.9) (#1516)
Unity RG32, RGB48 and RGBA64 textures (formats 72–74), with two, three or four unsigned 16-bit channels, showed as unknown formats and couldn't be previewed or exported. They're now decoded to RGBA8 with the same rounding as R16: missing blue is zero, missing alpha opaque, and Unity's row order and first-mip limits apply. Tests cover the byte widths, channel order, rounding boundaries, alpha, short pixel data and serialized Texture2D fixtures for all three.
2026-11-11 01:29:05 +07:00
FredApps 8eb67c191d Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:24:37 +01:00
Afloat 19f30cf82a Require definition or reference handles in CLI type signatures (R3.12) (#1556)
CLI signatures accepted a TypeSpec handle after CLASS or VALUETYPE, including as the base of a generic instantiation, which made up types such as Container<int, string><int> and could expand a recursive signature again and again. Those positions now take only TypeDef or TypeRef handles, as ECMA-335 requires. TypeSpec handles are still read for standalone type names and custom modifiers, where they're allowed.
2026-11-11 01:24:21 +07:00
Afloat 94835fbb9e Validate CMS signed attributes before reporting authentication (R3.12) (#1536)
The CMS reader took the first value of each signed attribute without checking its type or count, let a repeated required attribute overwrite the first, never compared contentType with the encapsulated content, and accepted the readable start of a malformed attribute list, so a genuine signature over such attributes could report authenticated for Mach-O CMS and a valid detached JAR signature. Signed attributes now need a complete list with exactly one messageDigest OCTET STRING and one contentType OID that matches the encapsulated type. When they don't, the signature stays readable, with its certificates, signer and algorithms, and is reported as not authenticated with the reason. Unknown well-formed attributes are kept.
2026-11-11 01:24:15 +07:00
FredApps a635ce6709 Merge branch 'main' into sonar/analysis-scope 2026-11-10 19:18:10 +01:00
Afloat 76b52be3f5 Keep fixed PE versions inside their declared values (R3.12) (#1555)
The PE version reader found the VS_FIXEDFILEINFO signature in the surrounding resource and then read the version fields without checking that the whole fixed record sat inside the node's declared value, so bytes from a neighbouring child, or from past the node, could supply a file or product version the node didn't contain. The fixed record is now read only from the node's declared binary value, which must be binary, hold all 52 bytes and end inside the node. Version strings in StringFileInfo are still read when no valid fixed record exists.
2026-11-11 01:17:48 +07:00
Afloat 90ec857f61 Bound retained Go function names when pclntab references are shared (R3.12) (#1554)
A Go function table can reuse one name offset for many records, and the function and per-name limits still let a small table hold hundreds of megabytes of names: 100,000 references to one 4 KB name in a real ELF ran out of memory under a 128 MiB limit. Kept function names now draw on a byte budget (64 MiB, or three times the table's extent if larger) in every table layout. When it runs out, the functions read so far keep their exact addresses, the list is marked truncated with a warning naming the limit, and the declared count is kept. Repeated names that fit stay complete.
2026-11-11 01:10:56 +07:00
Cr 18f3e8c63c Decode Swift concurrency standard types (R3.12) (#1553)
In a Swift symbol, Sc and one more letter is a short spelling of a concurrency type, as Si is Swift.Int: ScT is Task, ScG is TaskGroup, ScA is the Actor protocol, and so on. The demangler read Sc and stopped, so every symbol that contained one was invalid ("concurrency standard types are not supported"). Each now reads in module Swift as swift-demangle prints it, for example Swift.Task<(), Swift.Never>, and a letter with no type is still refused.
2026-11-11 01:10:49 +07:00
Cr d1aa3c1388 Decode Swift operator function names (R3.12) (#1551)
A Swift function named by an operator (==, +, a prefix -, a postfix ...) is mangled as its name, then o and a fixity letter, with each operator character written as a letter. The demangler stopped at the o ("unsupported operator 'o'"), so every operator function, and every witness, thunk and descriptor built around one, read as invalid: 34,816 of 2.36 million symbols in macOS and Xcode system binaries, 28,898 of which now decode. Operators now read as swift-demangle prints them, such as static Swift.Int.% infix(Swift.Int, Swift.Int) -> Swift.Int.
2026-11-11 01:09:45 +07:00
Afloat bcede83fc6 Apply Android package type offsets to resource identities (R3.12) (#1547)
Android resource packages with a nonzero typeIdOffset published the unshifted type byte, so a package with offset 3 and local string type 1 reported 0x7f010000 instead of 0x7f040000, and packages sharing a package ID could seem to define the same resources. The offset is now read from package headers of 288 bytes or more and added, checked, to public type and resource IDs, while type names are still looked up by the local ID. Legacy 284-byte headers keep an offset of zero. An oversized offset, or a shifted type outside the one-byte field, marks the result partial with a warning and leaves valid sibling types readable.
2026-11-11 01:09:39 +07:00
Afloat 1ebdb78760 Bound retained DEX payload attachments (R3.12) (#1548)
DEX disassembly copied array and switch payloads into every instruction that referred to them, and the instruction cap didn't bound those copies: a 77 KB input with 2,048 references to one 64 KiB array ran out of memory under a 128 MiB limit. A shared payload budget (64 MiB by default, decode_with_payload_limit to choose one) now pays for each payload and each attached copy before it is made. A payload that doesn't fit is left off its instruction, whose offset, name and width stay, and the listing is marked incomplete. The payload lookup no longer clones payloads, and android_method_show says a listing can be partial because of instruction or payload limits.
2026-11-11 01:09:33 +07:00
FredApps d36cb9f679 Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:59:12 +01:00
Afloat 76fcdaadb7 Reuse constant-pool names while reading Java attributes (R3.12) (#1549)
The Java class reader copied every attribute's name out of the constant pool, so thousands of attributes pointing at one long name made a class file under 100 KB allocate over 250 MB. Attribute names are now borrowed from the pool for the parse, as attribute bodies already borrow their bytes. Parsed structures and the handling of unknown attributes are unchanged.
2026-11-11 00:58:50 +07:00
FredApps 23cedad535 Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:52:07 +01:00
Cr 940db64bbc Decode Swift witness table accessor symbols (R3.12) (#1545)
Four kinds of Swift symbol end in W and a letter (Wl, Wb, WT, WI), each a function that finds or builds a protocol witness table. The demangler read the W but not the letter and reported every one invalid ("unsupported witness kind"). They now read as swift-demangle prints them: lazy protocol witness table accessors, base witness table accessors, associated type witness table accessors and instantiation functions for generic protocol witness tables. Operands that aren't the expected type, protocol or module are refused.
2026-11-11 00:51:41 +07:00
FredApps 35b59098cd Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:46:00 +01:00
Cr 01e79e52f7 Decode Swift special types such as non-escaping closures and AnyObject (R3.12) (#1546)
In a Swift mangling, X and a kind letter write a type with no letter of its own; the commonest is XE, a non-escaping function type. The demangler stopped at every X with "unsupported special type", so any symbol that mentioned such a type was invalid: 55,696 of 2.36 million symbols in macOS and Xcode system binaries. These special types now read as swift-demangle prints them, including non-escaping closures and AnyObject.
2026-11-11 00:44:04 +07:00
Afloat 3360c6dc14 Resolve CMS signer certificates from their declared identity (R3.12) (#1504)
When no certificate matched a CMS signer's issuer and serial, the signer was taken to be the first certificate, so a valid signature could be credited to a certificate the SignerInfo never named; version-3 signers identified by subject key identifier also fell back that way. Both identifier forms of RFC 5652 are now matched: issuer and serial, or a complete, unambiguous Subject Key Identifier extension. When nothing matches, the signer stays unknown and no chain is built from an arbitrary certificate. A version that doesn't fit the identifier form, or an empty serial, is noted in the report while the signature's certificates and algorithms stay readable.
2026-11-11 00:43:57 +07:00
FredApps c075b16d76 Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:38:21 +01:00
Afloat 09ef67dcff Retain only the requested SQLite row page (R3.12) (#1544)
Reading a page of rows deep in a SQLite table kept every decoded row before the offset, even when one row was asked for, and a zero-sized first page fell into the walk's unlimited mode. A 67 MB database with 16,384 rows of 4,000-byte text ran out of memory under a 128 MiB limit reading its last row. Rows before the offset are now counted and dropped as they're read, the walk stops once the requested range is consumed, and a zero-sized page reads no cells. Offsets, unreadable-cell notes, rowid aliases, added-column defaults, key order and WITHOUT ROWID handling are unchanged.
2026-11-11 00:36:01 +07:00
FredApps e8a61894ad Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:35:53 +01:00
RRFZ d56d03c36e Refuse multi-document YAML configs before editing them (R2.2) (#1534)
The YAML reader looked only at the first document while edits could land anywhere in the file, so a coding agent's config with several documents was edited or diagnosed against an incomplete view. A config with more than one document is now refused, with a plain message, before an edit is planned or an entry removed. A single document with explicit start and end markers is still accepted.
2026-11-11 00:35:25 +07:00
Afloat a7e66ab598 Preserve EVM bytecode when metadata map keys are ambiguous (R3.12) (#1508)
The EVM metadata decoder overwrote repeated CBOR map keys and turned non-text keys into JSON strings, so conflicting compiler entries or colliding key types could produce misleading metadata while the whole trailer was cut out of the bytecode analysis. A map key must now be an encoded text string and appear once, in nested maps too. A trailer that breaks either rule is no longer read as metadata and stays in the analysed bytecode. Ordinary compiler metadata reads as before.
2026-11-11 00:34:53 +07:00
FredApps 9e868dd781 Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:33:16 +01:00
Cr eac5144629 Decode Swift async function pointers and resume functions (R3.12) (#1543)
Swift async functions add three thunk operators: Tu, the async function pointer, and TY and TQ with an index, the suspend and await resume partial functions. The demangler reported every one invalid ("unsupported thunk or specialization"). They now read as swift-demangle prints them: "async function pointer to" the function, and "(N) suspend resume partial function for" or "(N) await resume partial function for" it.
2026-11-11 00:31:29 +07:00
Afloat 010dcbad17 Bind APK signer metadata to its signed copies (R3.12) (#1542)
APK signer verification accepted the unsigned SDK range without comparing it with its signed copy, chose a signature without checking that the ordered algorithm list matched the signed digest list, and accepted a readable prefix of incomplete signer fields, so each of these could still report verified with a genuine signature. A signer now verifies only when its required fields are complete, the signature and digest algorithm lists match in order, and the v3/v3.1 SDK ranges match their signed copies. A signer that fails these checks is still listed, with a note saying why it isn't verified. The separate signature, content-digest and public-key results are unchanged.
2026-11-11 00:31:24 +07:00
ISTAARI 923c139eb1 Keep the Detect button clear of the Harnesses tab (R2.9) (#1530)
In Settings → AI the "Found on this computer" caption, the Providers and Harnesses tabs and the Detect button shared one row, with Detect pinned to the right, so at narrower widths it covered the Harnesses tab (#1519). The caption now sits on its own line, and the tabs and Detect share one spacing and wrap together. A smoke test checks both modes, empty and populated lists, and widths of 760, 900 and 1280 points, and that the Harnesses tab can still be chosen.
2026-11-11 00:31:16 +07:00
RRFZ 26c48a8c30 Keep source map annotation URL suffixes intact (R3.12) (#1524)
A //# sourceMappingURL= line comment ending in */ lost those characters, so https://example.test/maps/*/ was read as https://example.test/maps/. Only a block annotation (/*# sourceMappingURL= … */) has its closing */ removed now, once. A test covers both line-comment prefixes and an ordinary block annotation.
2026-11-11 00:31:09 +07:00
FredApps 524cf57c6e Merge branch 'main' into sonar/analysis-scope 2026-11-10 18:23:49 +01:00
Afloat 190172d138 Bound retained Dart string-pool tracking (R3.12) (#1541)
The Dart snapshot string scanner capped what it returned but kept every unique URI and identifier it dropped in its de-duplication sets, so a caller asking for one result could hold millions of strings while scanning a snapshot. Only values actually kept are now tracked, as slices of the input, and each limit is checked before a new value is added. The scan still runs to the end and reports that values were left out. First-seen order, the separate URI and token limits, duplicate handling and the scanned-byte count are unchanged.
2026-11-11 00:22:05 +07:00
Afloat ada52c6cce Bound WebAssembly strings expanded through type and name references (R3.12) (#1540)
The metadata entry limit didn't bound the text that references produce: a valid 401 KB module with one 1,000-parameter type and 100,000 functions kept 500 MB of repeated signatures, and re-exporting one long function name copied it into every export. Each referenced type signature is now formatted once and cached, and the cache and every kept copy of a signature or name draw on one budget (64 MiB, or three times the input if larger) that is checked before copying. Metadata left out marks the report truncated with a warning. Function and tag index counting carries on past the display limit, so leaving rows out can't shift later indices or report a false declaration-body mismatch.
2026-11-11 00:21:15 +07:00
Afloat 1565bd4278 Avoid repeated selector scans in EVM dispatchers (R3.12) (#1538)
Each candidate selector comparison in an EVM dispatcher formatted a new string and searched every function found so far, so a dispatcher that repeated its comparisons could multiply the work without reaching the 4,096-selector cap. Selectors seen are now kept in an ordered set and checked before formatting. First-seen order, the original destination, the eligibility rules and the cap are unchanged. The same selector pushed at different widths counts once, and rejected candidates don't reserve one.
2026-11-11 00:16:26 +07:00
FredApps b97b44fa35 Remove the dead currentProgram check from the Ghidra bridge ping (#1482)
The bridge's ping began with an unused variable whose conditional gave an empty string either way. It's removed; the reply is unchanged.
2026-11-11 00:15:44 +07:00
FredApps 88ad1ad361 Drop the unreachable testId arm from the browser script name hints (#1481)
closest() in the browser script checker matches on the lowercased name, so its "testId" pattern could never match. It's removed; testId still maps to test_id through the lowercase "testid" arm, and a new test checks testid, testId, TestID, data-testid and data_testid.
2026-11-11 00:15:37 +07:00
RRFZ 25e43008c0 Apply repeated setup client selections only once (R2.2) (#1539)
Choosing the same coding agent twice in one setup, for example by claude_code and claude-code, planned two writes to one config file. The second write saw the first as an outside edit and rolled the installation back. Aliases are now resolved first, and each client is kept once, in the order chosen. A test applies the plan in a temporary home and checks that running it again changes nothing.
2026-11-11 00:15:30 +07:00