Repository navigation
Added
- (labels)
MAX_DELPHI_METADATA_ENTRIES(default 1,000,000) caps the metadata entries the ReSym provider
reads per image, so a corrupt or hostile image cannot drive VMT and method-table parsing without bound. - (binja) Export 32-bit ARM views (
armv7andthumb2) asarmreports. Each function is decoded in
its own instruction set and carriesthumbmetadata like the file-based backend. A T32 function's blocks in A32
(PLT veneers) are left out. Where an A32 and a T32 function claim the same bytes, only the one with more evidence
is exported: no invalid instructions, then more references to its start.binja_analyze.pycreates T32 functions
as T32. Measured on04652e66with Binary Ninja 6.0.10905 on the bundledarm_lz4_mixed_O2,arm_lz4_thumb_Os,
armnt_lz4_dllandmirai_arm: 479 of 491 ground-truth starts exported, all in their ground-truth instruction
set. Cost: fourudf #0xf9in the ARMNT DLL that Capstone cannot decode. Big-endian ARM stays unsupported.
Changed
- (labels) Delphi detection is looser.
_computeDelphiScorenow reaches the 0.6 thatcheckDelphi()needs
when ReSym validates at least two self-referencing VMTs (one can occur by chance; a real image has one per class,
dozens from the RTL alone), which turns on the Delphi candidates and finally recovery. Pythia no longer requires
_validate_metadata_addresses, and Pascal strings decode as cp1252, so 0x80-0x9F count as printable. Cost: a
non-Delphi image is somewhat more likely to be classed as Delphi. Not measured on non-Delphi samples: none of
the bundled non-Delphi fixtures containsTObject, so they never reach these checks. - (aarch64) Jump the gap scan over non-executable sections instead of stepping through them a word at a time.
nextGapCandidatenow bisects into the sorted, merged executable section ranges and resumes at the next one, as
the ARM backend already does. Measured on04652e6: gap scan time on a 50 MB Go ELF (gh 2.62.0 linux/arm64)
11.8 s to 3.2 s, about 5% of the whole run, and 25-60% less on three numpy/pydantic-core wheel libraries. Recovered
functions, blocks, instructions and PIC hashes are identical on all four. Not bundled; the behaviour is covered by
testAArch64GapScanExecSkip.
Fixed
- (common) Read successors in
Tarjan.closure()withgraph.get(v, ()), ascalculateScc()already does.
A vertex that only appears as a successor raisedKeyError. Nothing in SMDA callsclosure(), so no report
output changes. (#414) - (labels) Repair Delphi class RTTI offsets, published/extended method-table traversal, record bounds,
Unicode names, executable-target validation and Pythia table bounds, and prefer explicit PDB names over generic
PE entry-point labels. Cache shared legacy tables, share provider results and use a dependency-free
pointer-suffix scan. Measured on the supplied1d4e5452…5681csample against04652e6: 292 usable labels
become 7,969; five-run median provider time falls from 1.100s to 0.084s, with lower peak Python allocation.
Real metadata excerpts and malformed-input tests are bundled; the full binary is private. See
profiling/delphi_audit/. - (labels) PE export and entry-point labels (and their candidates) are no longer dropped when a PDB is
supplied. The PDB pass re-ran every label provider on the PDB's emptyBinaryInfo, which cleared
PeSymbolProvider; it now updates onlyPdbSymbolProvider. WithUSE_SYMBOLS_AS_CANDIDATESon by default,
exports and the OEP are candidates again on PE+PDB runs, so the function set can grow where the PDB does not
already name an export. Measured againstbfe39ec:msvc_cxx_pdb_pewith its PDB keeps 3 PE symbols instead
of 0; the function sets ofmsvc_cxx_pdb_peandrust_pe_msvc_i686with their PDBs are unchanged. - (intel) Recover normal-flow continuations from the validated 32-bit Delphi finally-dispatch idiom.
Constructor tails previously ended atpop eax; jmp eax; match the saved continuation and linked
handler thunk before following the missing edge. Real and generated regression fixtures are bundled.
Measured againstbfe39ec: complete reports bit-identical on 18 bundled non-Delphi x86/x64 PE, ELF and
PE+PDB fixtures. Reproduced by reviewer on 16. - (arm) Pass operands through
SmdaInstruction.getMnemonicGroup()for ARM.
Float-suffixed NEON instructions usingqregisters now classify as vector (V); scalar VFP stays float (F).
This changes ARM escaped-block signatures, so stored ones need recomputing; recovery and PIC/opcode hashes are
unchanged. Covered bytestArmDisassemblerand the fingerprint corpus's new ARM cases.
Compatibility
- (labels) Delphi names gain correct unit/class qualification and validated signatures.
- (labels) An explicit PDB symbol now takes precedence over PE's synthetic
original_entry_pointlabel
at the same address. - (intel) Delphi finally continuations extend owning function bodies and can change CFG fingerprints.
- (arm)
ESCAPER_DOWNWARD_COMPATIBILITYmoves from4.4.5to5.0.2, the release that ships the NEON
grouping change, so ARM reports from 5.0.1 and earlier compare as stale.
What's Changed
Changes
- fix(common): read successors with get() in Tarjan.closure() by @r0ny123 in #414
- fix(tests): return dynamic segment bounds from mapImage in testElfMappedBuffer by @r0ny123 in #415
- fix(tests): exercise Delphi label providers, ARM buffer fuzzing, and type checks by @r0ny123 in #417
- ci: add callgrind instruction-count gate by @r0ny123 in #418
- ci(profiling): compare the PR's CPU profile against the base branch by @r0ny123 in #419
- ci: report which code the fuzz corpora reach by @r0ny123 in #420
- ci: list the heaviest Malpedia samples in the benchmark report by @r0ny123 in #423
- perf(aarch64): jump the gap scan over non-executable sections by @r0ny123 in #427
- feat(binja): export 32-bit ARM and Thumb views by @r0ny123 in #428
- ci: run one fuzzer process per runner core by @r0ny123 in #421
- ci: fuzz capstone under AddressSanitizer weekly by @r0ny123 in #422
- fix(labels): repair and accelerate Delphi recovery by @r0ny123 in #424
- fix(arm): pass instruction operands when escaping ARM mnemonic groups by @r0ny123 in #416
- build: release 5.0.2 by @danielplohmann in #429
Dependency and tooling updates
- build(deps): bump the actions group across 1 directory with 2 updates by @dependabot[bot] in #426
- build(deps-dev): bump the dev-dependencies group across 1 directory with 2 updates by @dependabot[bot] in #425
Full Changelog: v5.0.1...v5.0.2