I'm definitely mentioning catboost + the bug you've found in it. I'm looking for a few more besides that one (not necessarily that they have to have been fuzzed, but that ZAFL successfully instrumented them without error).
@jdh8d Updating my work environment to examine this, I found a local edit that I need to stash or undo, from early August:
helix64$ git diff fix_calls.cppdiff --git a/irdb-libs/ir_builders/fix_calls.cpp b/irdb-libs/ir_builders/fix_calindex f5d508f..e0314a6 100644--- a/irdb-libs/ir_builders/fix_calls.cpp+++ b/irdb-libs/ir_builders/fix_calls.cpp@@ -252,7 +252,7 @@ class FixCalls_t : public TransformStep_t // calls to not the entry of a function likely result // from ida/rida mis-identification of functions. no need to fix them.-#if 0+#if 1 assert(cfg->getEntry()); /* if the call instruction isn't to a function entry p
Remember anything about this? I assume I should just go back to commenting this section out again by making the #if 1 back into #if 0.
@jdh8d So, ./clean-all.sh followed by ./build-all.sh --debug does not give me everything I need for gdb, because libstars.so still has no debugging symbols. Do we have a standard procedure for this kind of debugging build effort?
So, with add rsp,rax inside the function right before the return, the sub rsp,rax instruction will undo it, but first the location of the stored return address will be changed. Looking at the function in question:
Given an input value of 0x1780, we have this operation:
Copy 0x1780 into R11, leave RAX alone.
R11 is not <= 0x1000, so fall through the "jbe" statement.
Subtract 0x1000 from RSP, allocating space (?).
Subtract 0x1000 from R11, leaving 0x0780.
R11 is now less than 0x1000, so fall through the "ja" statement.
Subtract R11 from RSP, meaning subtract 0x0780, so RSP is now 0x1780 less than it was on entry.
Add RAX (still has 0x1780) to RSP, so adjustments to RSP are undone.
Return.
Therefore, in this example, the return goes to the instruction after the call, which subtracts 0x1780 from RSP, right? That allocates a big chunk of space, but STARS cannot easily analyze how much (0x1780) although I could add a simple analysis to determine if RAX was unchanged by the weird callee. That analysis is already performed later (i.e. we have a phase-ordering issue here).
Also, it appears that the two "test" opcodes in the weird callee are irrelevant, as the flags get reset by an add or sub opcode before the next conditional branch. Bizarre.