Add three CFGFast crash fixtures found by a corpus audit - #213
Conversation
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head
Dropped from this branch: Caveats: the two |
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Repository shape scan for the shapes these three objects supply, run over every tracked file under Both captures are the script's complete stdout. The workspace prefix of every absolute path has Before — at the merge base angr/binaries masterAfter — at head with this branch |
A 12 KB ET_REL Lua object, built by clang 15.0.7 from lundump.c. Under CLE at base 0x400000 its .text spans [0x400000, 0x40158d) and the next allocated section, .rodata.cst8, starts at 0x401590, so three bytes are mapped by no section and no segment. The last instruction of .text is a call to error, which angr concludes returns, so the return site is the first unmapped byte and CFGFast._analyze_all_function_features lifts it, raising SimEngineError out of the whole analysis. Fifty-three other x86_64 relocatables under tests/ have the same hole and all complete; twelve of those also end .text with a flush call, and in every one the callee does not return.
cfg_mapfail_static_member.o: a 14 KB i386 relocatable, the libgomp member of a NetBSD static archive. gomp_team_start reads through %gs at 0x400815, so the blocks CFGFast pre-executes ahead of its call sites end in a guarded Ijk_MapFail exit and the analysis aborts with AngrExitError. It is the only EM_386 relocatable under tests/ that carries a segment override. cfg_arm_elf_fast_resolve_put: the unmodified in-tree raid6_pq module from an ARMv7 Linux 6.6.141 build, GPL-2 per its .modinfo. Its first block contains register-to-register Add32 operations, so ArmElfFastResolver. _resolve_put finds no constant to index and raises IndexError. The five other ARM relocatables under tests/ all complete, btrfs.ko included even though it reaches the same resolver.
e08757b to
f526aa5
Compare
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Rebased onto binaries master: This was not cosmetic. The branch sat one commit behind master, and that commit — |
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
An open angr pull request fixes a
CFGFastabort that only reproduces on an i386 relocatablewhose code reads through
%gs, and this repository has no such object. Scanning the 737 ELF files undertests/at the merge base3bfd1de0for anELFCLASS32EM_386ET_RELobject with a segmentoverride in an executable section:
So that regression had to assemble its caller in memory, which the test-input gate rejects. Two
further
CFGFastcrashes from the same corpus audit have no input here either.Root cause
Header shape alone does not separate the other two objects from what is already here — 53 x86_64
relocatables already have an unmapped inter-section hole, and
tests/armel/btrfs.kois already anARM relocatable kernel module — so only the crash each one reproduces distinguishes it, and that
is what is measured below.
Fix
Three objects, read back from the committed bytes:
tests/i386/cfg_mapfail_static_member.o40666428fd5beec9267b3bef3e2ce368fdc782c7cf0c4bfff8f62192c86e3d65STT_FUNC, 45 undefinedtests/x86_64/relocatable_section_gap.o9169224dc719bfae42264b5ffed6c94f0837453175951b4262fa02a4f100dc03STT_FUNC, 17 undefinedtests/armel/cfg_arm_elf_fast_resolve_putac7420b96b6dbc22f5bebe863cde3f43f6bc385722f2a0660bd25af89ac85695STT_FUNC, 9 undefinedThe i386 object is the libgomp member of a NetBSD static archive; the x86_64 object is a Lua
lundump.cobject built byUbuntu clang version 15.0.7; the ARM object is the unmodifiedin-tree
raid6_pqmodule of an ARMv7 Linux 6.6.141 build,license=GPLper its.modinfo, thesame situation as the
btrfs.koalready here. None has a recorded build recipe, so none isreproduced byte for byte from a command; each is a corpus object committed as found.
A fourth object on this branch, a 6502 Intel HEX image, was dropped: the
tidy_data_referencescrash it was collected for is already fixed, by angr #6811, whose regression uses the existing
tests/armel/lwip_tcpecho_bm.elf, so at master it reproduces nothing.Testing
The same scan at the head reports 1 match for the i386 object. Loading each object with
CFGFastat angr
4ab97b7braises, respectively,AngrExitError: Cannot execute following jumpkind Ijk_MapFailinpthread_create.static_exits,SimEngineError: No bytes in memory for block starting at 0x40158dinCFGFast._analyze_all_function_features, andIndexError: list index out of rangeinArmElfFastResolver._resolve_put. Every same-shape object already intests/completes instead: all 53 x86_64 relocatables with an unmapped hole, including the 12 that also
end
.textwith a flushcall, and all 5 ARM relocatables,btrfs.koincluded even though itreaches the same resolver.
Consumer: angr/angr#6809 loads the i386 object; the other two have none yet. Validation: #213 (comment)
session: sharpen