Commit Graph
761 Commits
Author SHA1 Message Date
YAO Changsong bd72993604 Keep the extension on AArch64 memory index operands (R3.11) (#1745) (#1745)
A register-offset AArch64 memory operand such as ldr w0, [x1, w2, sxtw #2] now keeps its index at its written width with its extension or shift, so pseudo-C shows the sign-extended index ((int64_t)(int32_t)w2 << 2) instead of a plain unsigned x2 * 4. An unchanged index stays plain, and x86 scaled indices render as before.
2026-11-12 14:54:11 +07:00
Justin John b9de86c149 Bound Ghidra's jump tables that have no bounds check before decompiling (R1.5) (#1743) (#1743)
A jump through a byte-indexed table of offsets with no bounds check, as Rust's async state machines use, made Ghidra read 256 entries, follow the ones inside other code and decompile without end (#1715). Before decompiling, the bridge now finds such tables, works out where each ends from a linear pass over the function (its .pdata extent on Windows) and gives Ghidra their real targets as a switch override, in memory for this run; guarded tables only get their targets added. A 60-stage Rust async program decompiled in 16 s instead of falling back after 938 s. Fixes #1715.
2026-11-12 14:12:52 +07:00
RRFZ d67583b183 Recognize HTTP extension methods in packet captures (R3.12) (#1741) (#1741)
A captured request using a WebDAV or other extension method (PROPFIND, MKCOL, REPORT…) now reads as HTTP with its method, target and Host, instead of only the nine common methods: any valid HTTP method token counts, case kept, with the same start-line and version checks as before.
2026-11-12 13:33:56 +07:00
RRFZ ff7311ae94 Separate SQLite column names at SQL line breaks (R3.12) (#1740) (#1740)
A CREATE TABLE whose column names are followed by a carriage return or form feed now reads them apart from their types, as SQLite does, so an INTEGER PRIMARY KEY written that way is still the rowid alias and its rows show the stored rowid instead of NULL. Quoted names keep those characters.
2026-11-12 13:32:43 +07:00
RRFZ a61879758a Stop TAR listings at invalid local PAX sizes (R3.12) (#1739) (#1739)
A member's own PAX header with a size that isn't plain decimal digits (a word, a sign, spaces, an overflow) now stops the listing before that member with a warning, as an invalid global size already did, instead of quietly falling back to the ordinary header and reporting a complete archive. Earlier members stay readable.
2026-11-12 13:26:30 +07:00
RRFZ befb291a1f Keep quoted delimiters inside XML plist tags (R3.12) (#1738) (#1738)
An XML plist tag with an attribute such as note="a>b" no longer ends at the quoted >: quotes are tracked while finding the tag's end, so valid documents parse, and an attribute whose quote never closes is refused instead of turning later markup into a value.
2026-11-12 13:18:12 +07:00
RRFZ 52e6817bf0 Stop CArchive listings at unterminated member names (R3.12) (#1733) (#1733)
A packed Python executable's table entry whose name has no terminating NUL is now read as damage: the listing stops there, keeps the members before it and says why, instead of taking the record's padding as a file name.
2026-11-12 12:29:49 +07:00
RRFZ 726fa4d25b Keep ordinary EVM metadata arrays typed (R3.12) (#1732) (#1732)
A contract's CBOR metadata no longer turns every array of three integers into a dotted version string: only the solc and vyper fields read as compiler versions, so an entry such as sizes: [1, 2, 3] stays an array.
2026-11-12 12:23:25 +07:00
RRFZ 744e5c9838 Read source map annotations with optional marker spacing (R3.12) (#1731) (#1731)
A script's trailing sourceMappingURL annotation is found with no space, a tab or several spaces after the //#, //@ or /*# marker, as the source map standard allows; an annotation whose URL contains whitespace is ignored.
2026-11-12 12:13:49 +07:00
RRFZ 5756393c83 Keep CRLF when adding the first JSONC object (R3.12) (#1730) (#1730)
Creating the first object in a whitespace-only or comment-only CRLF settings file now uses the file's line endings, as adding to an existing object already did. Comments and a BOM stay in place; a new empty file still uses LF.
2026-11-12 12:08:33 +07:00
RRFZ e0c70c2926 Normalize XML plist line endings before decoding text (R3.12) (#1726)
XML plists saved with Windows line endings kept carriage returns inside string values and dictionary keys, so a key written across lines couldn't be found under the name a conforming XML reader returns. Literal CRLF and CR now become LF before tokenizing, as XML 1.0 requires, in UTF-8 and both UTF-16 byte orders; a &#13; character reference still gives a carriage return.
2026-11-12 12:02:39 +07:00
Nicolas Bohn 12aad97757 Keep the sources of a source map refused for bad mappings or section offsets (R3.12) (#1717)
A map with malformed mappings or section offsets was reported unreadable, although its sources list is usually whole, and the list is all an application graph keeps. A new sourcemap::parse_sources reads the sources, content, names and ignore list without decoding mappings or checking section offsets; the application graph re-reads a map parse refuses for those reasons this way, lists its sources with a source_map_mappings_unreadable limitation, and compares them as usual. A map whose decodable mappings name a source past the end of its list, or with a malformed section, is still unreadable.
2026-11-12 09:26:47 +07:00
Nicolas Bohn 438c80082a Report sources of unreadable source maps as uncertain, not missing (R3.12) (#1708)
A source map that was malformed, had an undecodable data URL or was listed but not loaded left its sources looking absent, so a source comparison reported them as confirmed missing. Such a map is now marked unreadable with a limitation, and the comparison reports otherwise unmatched sources as uncertain with partial coverage. A stand-alone .map beside an analysed script is read like a referenced one; other .map files stay listed and unread, so they can't make a comparison uncertain or match code that doesn't ship.
2026-11-12 08:50:04 +07:00
Nicolas Bohn ab79ec87a4 Count source-map sections, check skipped values and keep refused maps' sources uncertain (R3.12) (#1705)
Follow-up to #1703. A sections array of non-objects could cost several times the old parser's memory, skipped values weren't checked as a full read checks them so some broken maps read as valid, entries a repeated key replaces still used the budget, and the analyzer read a map refused at a limit as one with no sources. Index-map sections now count against the entry budget and non-map sections stay small, skipped values get the same string, number and nesting checks, a replaced list is freed and gives its entries back, the default limit is 4,000,000 so a million sources with content fit, and a map refused at any of the parser's limits leaves its sources uncertain with a limitation, while a malformed map is read as before.
2026-11-12 02:43:59 +07:00
Nicolas Bohn ba83da2bc5 Refuse source maps with more entries than the parser keeps (R3.12) (#1703)
The source-map parser read the whole JSON into a value and then copied every sources, sourcesContent and names entry, so a 64 MiB map of empty strings built about 21 million strings twice before anything was checked. It now reads only the fields it uses, straight from the JSON, and counts every sources, sourcesContent, names and ignore-list entry against one limit (2,000,000 by default) shared across sections; a map with more is refused with TooManyEntries as soon as the limit is passed, without reading the rest.
2026-11-12 02:17:19 +07:00
Alex Joaquim Pereira cbf7c17981 Resolve relative project paths before builds, option runs and Play (R2.7) (#1702)
A project placed by a relative path gave engines and programs relative paths, but the child already runs inside app/, so Unity's -projectPath, Godot's --path, Unreal's -project and -archivedirectory, option runs (--screenshot, --self-test), console run checks and Play pointed inside app/ a second time. They now resolve the project path first; a program named by a bare PATH command is left as it is.
2026-11-12 00:49:27 +07:00
Alex Joaquim Pereira 3ce1ce9f52 Bound source-map recovery manifest paths and report partial recovery (R3.12) (#1700)
The source-map parser bounds the inventory it builds, but source recovery's manifest repeated every expanded source path in its outputs, so a long shared sourceRoot could still retain tens of megabytes of paths. Recovery now charges each original's source path and output path to the inventory's entry and byte budget, shared across inputs; once it's reached, further originals are left out, and the manifest, result, summary, a limitation and partial coverage say so. A pitfalls entry records the rule.
2026-11-11 23:34:20 +07:00
Afloat 3a9ad9c6c5 Report uncertain source comparisons after source-map truncation (R3.12) (#1694)
When a source map's inventory was cut by its limits, the source-to-bundle comparison searched only the retained names and reported an omitted source as confirmed unmatched. Sources with no observed match now go in a separate uncertain_sources list with the reason source_map_inventory_truncated, the result says the inventory was truncated, and the evidence carries a limitation and partial coverage; positive matches are unchanged.
2026-11-11 22:17:23 +07:00
Afloat 35f1136502 Keep colliding source-map originals during recovery (R3.12) (#1690)
Distinct source identities such as src//main.js and src/main.js normalize to the same recovery path, so recovery kept the first and dropped the rest; a file and a folder of the same name, and separate inputs with the same name, lost sources the same way. Ordinary paths are unchanged; a source whose path would collide now goes to its own sources-collisions/<input>/<source>/ folder, and the manifest records each one's input and source-map index. A pitfalls entry records the rule.
2026-11-11 21:53:57 +07:00
Afloat 22c44d01d2 Bound expanded source-map source lists before building them (R3.12) (#1689)
A small source map could expand to gigabytes when its sourceRoot was copied into every source name, and the full list was built before the application analyzer kept 5,000 of them. Source lists are now built within an entry and byte budget shared across sections and an application's maps, checking each expanded path's length before allocating it; when only a prefix fits, the result says it was truncated and the analysis notes it as a limitation. A pitfalls entry records the rule.
2026-11-11 21:34:19 +07:00
Alex Joaquim Pereira 87408500d0 Keep a failed program's last output in its error (R2.9) (#1685)
When a program printed more than its output cap, its error said "what it printed last" from the first bytes kept and never said the rest was dropped. The process runner now also keeps the last 16 KiB of a stream once it passes its cap; failure messages, ssh diagnosis and build checks quote that end and say the output was cut, while tools that parse output still get its start.
2026-11-11 20:32:53 +07:00
Alex Joaquim Pereira 80479a9b9e Use an attached project's saved builder and keep its feed and request (R2.9) (#1684)
After #1682, a run on a reattached project still used the builder picked on Make instead of the project's own, replaced the live conversation of a project already building, and cleared the Make draft even when the run didn't start. It now uses the saved builder (asking for one if it's gone), shows the running build's conversation and says it's already building, and clears the draft only once the request is running or queued. The run remains the only writer of the project's feed.
2026-11-11 20:11:12 +07:00
Alex Joaquim Pereira 2cee4610f0 Keep a reattached project's saved settings, conversation and follow-up request (R2.9) (#1682)
Since #987, picking a folder that already holds a project attaches to it, but the create path then overwrote its saved builder, asset budget, generated-assets choice and stack, replaced its conversation, and dropped the typed request. An attached project now keeps everything the person set and its saved conversation, and the request is added as its follow-up, in the app and the CLI; the CLI refuses --build-with, --generate-assets and --existing for such a folder with a fix to use instead.
2026-11-11 19:19:15 +07:00
Afloat 007aeebb02 Compare stable numbers in console run checks (R2.5) (#1679)
The console run check compared words after dropping one-character tokens, so bare results like 4.5 and 9.0 looked empty and 12 matched -12. Study now runs the original twice per input; the check requires the numbers that were the same in both runs to match in order (keeping signs, decimals, exponents, radix and large integers), ignores numbers that varied between them, such as timings and PIDs, and says so in its note. Without a second observation it compares words only. Program names are replaced only as whole words, so they can't eat into numbers.
2026-11-11 19:16:30 +07:00
Afloat 500a09a217 Apply source map root prefixes before interpreting source paths (R3.12) (#1680)
Source lookups and recovered source lists dropped sourceRoot when a source started with / or contained ://, giving the wrong original source. A non-empty root is now prefixed to every source before it is read as a URL, as ECMA-426 describes; an empty root still means no root, since generators commonly write "" for that.
2026-11-11 19:04:22 +07:00
Afloat b12816c2b3 Recover classic ext triple-indirect file blocks (R3.12) (#1666)
Files reaching the third level of classic block pointers (above about 64 MiB with 1 KiB blocks) were left unrecovered. The reader now follows the triple-indirect pointer, keeps the full logical span of sparse subtrees at every level, and still refuses files whose mapping blocks are unavailable.
2026-11-11 18:56:44 +07:00
Afloat 842a76a41a Tell nonfinite CIL constants apart in method fingerprints (R3.12) (#1673)
Method fingerprints wrote float constants as JSON numbers, which can't hold NaN or infinity, so methods differing only in such constants got the same fingerprint. Nonfinite constants are now written as their IEEE-754 bits, and single-precision NaNs keep their original operand bits, which widening to double could change.
2026-11-11 18:56:37 +07:00
Afloat aad1a6d62b Return the first XZ stream from SquashFS blocks (R3.12) (#1669)
SquashFS reads one XZ stream per block, but the block decoder refused a complete first stream whenever bytes followed its footer, so the file's data was lost. It now checks the stream the decoder consumed as a complete XZ stream on its own and returns it, ignoring what follows, and still never returns output from a stream that failed to decode.
2026-11-11 18:50:53 +07:00
Afloat 67ba23122d Keep sBPF symbol and relocation limits global across ELF tables (R3.12) (#1678)
The sBPF inspector capped symbols and relocations at 400,000 records, but reaching the cap only ended the current table, so each further SYMTAB/DYNSYM or REL/RELA table could add another record past it. It now stops visiting further tables of that kind once the cap is reached, keeping the earlier records and their order.
2026-11-11 18:50:45 +07:00
Afloat bf342840fb Report unavailable cramfs block-pointer tables as incomplete (R3.12) (#1681)
A cramfs file whose block-pointer table lay outside the available filesystem bytes was left without contents, but nothing said so, and the image still counted as completely recovered. Such a file now gives a warning and marks the image incomplete, keeping the file listed.
2026-11-11 18:48:37 +07:00
Afloat 037ca0d047 Recover JFFS2 files from big-endian images (R3.12) (#1665)
Big-endian JFFS2 images were detected and then refused. The reader now takes the byte order from the first node's magic, after any erased space, and reads node, inode and directory integers in it, so the same tree and contents come out in either order; a node in the other byte order stops the scan with a warning.
2026-11-11 18:35:44 +07:00
Afloat f04d7456e0 Reject impossible JVM array allocation operands (R3.12) (#1675)
newarray accepted any element-type byte and multianewarray accepted zero dimensions, both of which the JVM refuses. The decoder now stops at a newarray whose type isn't one of the eight primitive array types or a multianewarray with zero dimensions, as for other invalid instructions.
2026-11-11 18:35:12 +07:00
Afloat f376711d9b Keep literal $null strings in keyed archives (R3.12) (#1674)
Any object that was the string "$null" was read as the archive's nil marker, so a real string with that text disappeared. Only the archive's first object, where the marker lives, is now read as nil; a "$null" string anywhere else stays a string.
2026-11-11 18:35:05 +07:00
Afloat 34774fd3b3 Report packet evidence only for valid capture and protocol fields (R3.12) (#1247)
DNS labels showed dots, backslashes and unprintable bytes as they came, so different wire names could look the same; they're now escaped (\. \\ \DDD). HTTP is reported only for a complete start line: a request with a known method, a target without control characters and an HTTP/1.x version, or a response with an HTTP/1.x version, a three-digit status and an optional reason phrase. The packet tools' warning about unreadable parts now says what may be missing.
2026-11-11 18:34:37 +07:00
Afloat ebc5a24d9f Recover ZIP64 end records shifted by prepended data (R3.12) (#1676)
In a ZIP64 archive with data in front of it, the locator's stored offset can miss the end record, and the classic fallback then counted the ZIP64 record and locator as prefix bytes and lost the central directory. Before falling back, the reader now looks for the record within 64 KiB before the locator, and takes it only when it is single-volume, agrees with the classic record and has a central directory right before it; a warning says it was recovered.
2026-11-11 18:33:38 +07:00
Afloat d26ee55bc2 Recover ext4 files stored entirely inside their inode (R3.12) (#1667)
Small ext4 inline files had their contents read as block addresses, so they failed to recover or came out as zeros, and a filesystem with only the inline-data feature was labelled ext2. Regular inline files of up to 60 bytes are now read from the inode, within the usual byte budget; longer inline files and inline directories are still reported as not recovered.
2026-11-11 18:25:46 +07:00
Afloat 8d8e05c609 Keep unavailable ext4 extent mappings from fabricating file bytes (R3.12) (#1671)
After a bad extent header or an unreadable child block, the extent walker returned a partly filled map, and recovery showed the missing ranges as zeros. Extent nodes now have to be complete and consistent (magic, entry counts, child depths, non-empty extents), within a shared work budget, or the file is left unrecovered with a warning.
2026-11-11 18:24:03 +07:00
Afloat a9bb6df790 Recover LZ4-compressed SquashFS metadata and file data (R3.12) (#1668)
LZ4 SquashFS images were refused although the project has a bounded raw LZ4 decoder. SquashFS metadata, data blocks and tail fragments now decode with it, treating the size as an upper limit, while Unity bundles keep requiring the exact decoded size.
2026-11-11 18:23:14 +07:00
Afloat 0b35448ed5 Check every SquashFS data block against its share of the file (R3.12) (#1670)
Data blocks were concatenated whatever their length and the result trimmed at the end, so a short or corrupt first block could shift the bytes after it while the file looked complete. Each raw or decoded block, sparse blocks and the last partial block included, must now cover exactly its part of the file, or the file is left unrecovered with a warning.
2026-11-11 18:22:58 +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 8031499657 Keep version-two cramfs reads inside the filesystem's size (R3.12) (#1664)
Directory and file pointers in a version-two cramfs image could reach bytes appended after the filesystem, so unrelated trailing data could fill in recovered contents. The size recorded in a version-two header now bounds every read, in either byte order; an image shorter than that size is read as far as it goes and marked incomplete, and version-one images are read as before.
2026-11-11 18:18:40 +07:00
Afloat 28198b6986 Keep special inode kinds when reading ext filesystems (R3.12) (#1634)
Any ext inode that wasn't a directory or symlink was read as a regular file, so device, socket and FIFO fields could be taken as block pointers. The inode's mode now decides its kind: special and unknown inodes are listed as other entries without reading their fields as data, and a directory entry's type hint can't override the inode.
2026-11-11 18:10:21 +07:00
Afloat 4a078510d4 Read PKCS#7 certificates only from SignedData's certificate field (R3.12) (#1132)
The certificate reader took any [0] field inside SignedData, kept non-X.509 certificate choices, and applied the certificate limit per field. It now reads the certificates field only in its declared place after the version, digest algorithms and content, returns only X.509 (SEQUENCE) choices, and applies the limit once.
2026-11-11 18:10:15 +07:00
Afloat 35a5a1446d Check the ZIP64 end record's extent against its locator (R3.12) (#1137)
The ZIP64 end record's declared size wasn't checked. A record smaller than its fixed fields, an extent that overflows, or fixed fields that run into the locator now make the archive corrupt; a declared extent that doesn't end at the locator, or a locator that doesn't point to a record (as in archives with a stub in front), keeps reading the directory with a warning, as before.
2026-11-11 18:02:25 +07:00
Afloat 3876d7fbb2 Recognise UTF-16 keyed-archive NIB files (R3.12) (#1657)
The XML plist reader already decodes UTF-16 after either byte-order mark, but the check that decides a file is a plist only looked for ASCII <plist, so UTF-16 NIB archives were turned away first. The check now also finds the UTF-16LE and UTF-16BE marker after its byte-order mark, on code-unit boundaries, within the same 1 KiB probe.
2026-11-11 17:50:03 +07:00
Afloat 65fad01a0d Require complete Android resource entry payloads (R3.12) (#1654)
A type chunk whose entry data started inside its offset table or past the chunk was still read, and a bag entry with a short header, or more values than fit in the chunk, read past its data. The type is now skipped with a warning in the first case; in the second the entry is kept without its parent and values, the table is marked truncated, and a warning says why. A bag with more values than the reader keeps is marked truncated too.
2026-11-11 17:49:57 +07:00
Afloat 88993fabc1 Keep fractional seconds in property-list dates (R3.12) (#1656)
Binary plist dates and keyed-archive NSDate values were shown floored to whole seconds, so events within one second looked the same. They now keep their fraction, rounded to microseconds (finer would only show the float's noise for present-day dates), with a rounded-up second carried into the date; whole seconds still show without a fraction.
2026-11-11 17:34:46 +07:00
Afloat 49af55e4e4 Don't recover JFFS2 files from data nodes that didn't decode (R3.12) (#1636)
A data node that failed to inflate, used an unsupported compression or decoded to a length other than its declared size was skipped, leaving zeros or older bytes in the file while it looked recovered, and an overlong raw node could overwrite the next extent. Such nodes now mark their extent damaged; a newer valid node can still replace it, and a file is left unrecovered only if a damaged extent survives into its final contents.
2026-11-11 17:34:05 +07:00
Afloat fdf958e443 Note non-minimal DER lengths in signatures and certificates (R3.12) (#1646)
The DER reader accepted redundant length encodings (a long form under 128, or a leading zero length byte) without saying so. Each element now records whether its length is minimal; certificate, CMS, Authenticode and certificate-chain views keep everything they read and add one note that an element is not strict DER, and signatures over those bytes are checked as before.
2026-11-11 17:26:06 +07:00
Afloat c68090d182 Keep certificate name values distinct when they aren't plain text (R3.12) (#1652)
Lossy decoding turned different malformed name values into the same replacement characters, and UniversalString values weren't decoded. Name values are now decoded by their string type (UTF-8; Printable, IA5, Visible and Numeric as ASCII; T61 as Latin-1; BMP and UniversalString as UTF-16 and UTF-32), and a value that is malformed or of another type is shown as its hex DER encoding.
2026-11-11 17:23:23 +07:00