Add an ARMEL fixture for zero-size normalization anchors - #201
Conversation
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head
Caveats: this repository has no test suite, so the record is header and byte verification of the committed artifact, the rebuild above, and the load. The consumer test that fails without this fixture lives in the angr change; it was not run here. |
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Searching every Before — no ARM fixture holds one, so no fixture can produce the zero-size CFG node the defect needs: angr/binaries at the merge baseAfter — with this change |
CFGBase.normalize() groups nodes by end address to decide which overlapping blocks to split. A zero-size node lands in the group of every node that ends where it starts, wins the "highest address" selection, and splitting the group at its address shortens nothing. No existing fixture produces a non-SimProcedure zero-size CFGNode. This one does: a UDF instruction that VEX decodes to a zero-byte IRSB, placed at the end of two overlapping blocks inside one function.
8481567 to
7676944
Compare
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS angr#6960, the consumer this fixture was added for, is closed: angr#6839 repairs It is left open rather than closed because it is still the smallest input that The description's premise needs correcting either way. The search behind it |
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
angr's CFG normalization has a defect that needs a zero-size node as the anchor of an end-address group, and no fixture here can produce one. A node reaches size zero when the ARM undefined-instruction recognizer accepts an address and the lifter returns an empty IRSB for it, which takes the permanently-undefined word
0xe7f000f0sitting where a block ends. Searching every ARM object undertests/:Without an input, the consumer test can only assert on a graph it assembles itself, which is the shape the test-inputs rule exists to prevent.
Root cause
A compiler does not emit
UDFin the middle of reachable code, and it does not emit two blocks that overlap and end at the same address. The arrangement has to be written in assembly.Fix
Add
tests/armel/normalize_zero_size_anchor, an ARMELET_EXECof 852 bytes.entangleat0x10084branches into itself twice, so the blocks entered at0x10098and0x1009coverlap and both end at0x100a0, where the word is0xe7f000f0:Source and a build script are in
tests_src/cfg_tests. Nothing existing is touched.Testing
tests_src/cfg_tests/build_normalize_zero_size_anchor.sh, run undernix shell nixpkgs#pkgsCross.armv7l-hf-multiplatform.buildPackages.gcc(GCC 15.3.0), reproduces the committed file byte for byte, so the recipe and the artifact agree. This repository has no suite of its own; the consumer is the angr change toCFGBasenormalization, whose new test fails until this merges.Validation: #201 (comment)
session: sharpen