You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a very rare case of epilog analysis false-positive I found when checking epilog detection robustness for the WIP SEH backend, but I thought it was worth reporting.
The sample landed on an in-function jump:
0x35911b800 488b4258 mov rax, qword [rdx + 0x58] ; 0x58 looks like a pop but is actually an offset
0x35911b804 eba9 jmp 0x35911b7af ; sample ip here
The function starts at 0x35911b6c0 and ends at 0x35911ba8c.
It looks like the current heuristic can break if you stress it with millions of samples. :P
After analyzing more cases, I've realized that the jump target heuristic can't work for indirect jumps. (In general, the indirect jump identification is much harder, and there doesn't seem to be a reliable way to tell between indirect tail-calls and indirect switch-table jumps.) So the pop byte heuristic needs to stay at least for those cases.
This is a very rare case of epilog analysis false-positive I found when checking epilog detection robustness for the WIP SEH backend, but I thought it was worth reporting.
The sample landed on an in-function jump:
The function starts at
0x35911b6c0
and ends at0x35911ba8c
.It looks like the current heuristic can break if you stress it with millions of samples. :P
framehop/src/x86_64/instruction_analysis/epilogue.rs
Lines 33 to 43 in 1517df9
Wine uses something different: It checks if the jump lands within function bounds.
https://github.com/wine-mirror/wine/blob/d0ce5a77c60e0a9613f1af03d67d13b89816441b/dlls/ntdll/signal_x86_64.c#L720
This could be potentially more robust, but needs testing.
The text was updated successfully, but these errors were encountered: