Repository navigation
[AUTOMATED] Stop discovering function entries in the middle of real functions on stripped ARM images - #1900
Merged
Conversation
The prologue-pattern scan, the ARM frame scan and the aif gap walk plant entries inside real functions on stripped images (shrink-wrapped frame pushes, variadic register saves, switch cases, blocks moved past the return). funcboundflow then cut the real function at the planted entry. A new Listing consumer (listing/kuna_falseentry.rs) reads the finished partition and every entry stream and names, for the commit to drop, each unattested entry that live code runs into, that the preceding entry's own flow reaches by a conditional branch or switch case, or that it runs into while branching past it. A code pointer whose code runs into a dropped entry becomes the entry in its place. Always on where the walk's functions are committed (non-x86-64 drivers); no option. [AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
A function that dispatches through a table (`blx r3`) or tail-jumps through a register never proved a return under the pool-extent trust notion, so the code after a call to it was not live and the case labels and shrink-wrapped pushes behind it stayed entries. The interior-entry scan now uses a lenient variant of that notion; pool extents keep the strict one. Also shortens the CLI probe's notes to the schema limit. [AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
…'s cut The scan cached each decoded step by value and cloned it on every read; it now shares them and hashes its visited sets, which halves its cost on large Cortex-M images. function_warnings_cli pinned register_tm_clones being cut at the `sub esp,4` inside it, an entry the prologue scan planted and that is no longer discovered. The test now declares that entry, so it keeps checking where the drained funcboundflow warning lands. [AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
The second half of an_empty_body_s_drained_warning_is_a_body_warning_in_every_language decompiles register_tm_clones again without the declared entry; it now passes the same --define-function. [AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
[AUTOMATED] Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On stripped ARM images, function discovery plants entries in the middle of real functions: a frame push after an early test, a block the compiler moved past the return, a switch case. The real function is cut at that entry and the rest is decompiled as a separate function.
With this change 0x8008026, 0x8008046 and 0x8008084 are no longer listed, and the handler decompiles from its real start:
listing/kuna_falseentry.rs) runs after all entry oracles and drops an entry that nothing in the image vouches for (no direct call, symbol, entry oracle, code pointer or call table) when live code runs into it by fall-through or a predicated skip, or when the preceding function's own flow reaches it by a conditional branch or a switch case (or runs into it while also branching past it).bto the next address stays a tail call.listing+funcstart_patterns, the non-x86-64 driver default). x86-64 output does not change.Tests:
kuna-console/tests/verify_falseentry.rsandtests/cli/false-entry-inside-shrink-wrapped-function.jsonon the new fixture (both fail on main), plus unit tests in the module and inkuna_poolextents. On 63 stripped ARM decbench binaries checked against their unstripped twins, discovered entries at no symbol drop from 1,616 to 708, no symbol start is lost and 10 are added. On the decbench O2 corpus 71 more functions match the source's control flow exactly (gained 76, lost 5; four of the five lost were empty truncated bodies that matched by accident), and functions carrying thefuncboundflowtruncation warning drop from 336 to 94 (most of the rest follow a call that never returns).Model:
anthropic/claude-opus-5-5🤖 Generated with Claude Code
https://claude.ai/code/session_013BBaWVABMswm9QwjnywGWU