2016
DOI: 10.1145/2980983.2908119
|View full text |Cite
|
Sign up to set email alerts
|

Polymorphic type inference for machine code

Abstract: For many compiled languages, source-level types are erased very early in the compilation process. As a result, further compiler passes may convert type-safe source into type-unsafe machine code. Type-unsafe idioms in the original source and type-unsafe optimizations mean that type information in a stripped binary is essentially nonexistent. The problem of recovering high-level types by performing type inference over stripped machine code is called type reconstruction, and offers a useful capability in support … Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
17
0

Year Published

2017
2017
2023
2023

Publication Types

Select...
3
2
1

Relationship

0
6

Authors

Journals

citations
Cited by 12 publications
(17 citation statements)
references
References 29 publications
0
17
0
Order By: Relevance
“…This program takes as a parameter a variable with type (struct) pointer, which is represented as [ebp + 8] in assembly codes and whose related instructions are listed in Figure 2. According to the standard typing rules for assembly codes [2], [6], the first 6 related instructions infer that the type of [ebp + 8] should be a type of size 32, while the last instruction suggests that the type of [ebp + 8] is int. Accordingly, both the types recovered for [ebp + 8] by Hex-Rays and Snowman are int, which is incorrect.…”
Section: Motivating Examplesmentioning
confidence: 99%
See 2 more Smart Citations
“…This program takes as a parameter a variable with type (struct) pointer, which is represented as [ebp + 8] in assembly codes and whose related instructions are listed in Figure 2. According to the standard typing rules for assembly codes [2], [6], the first 6 related instructions infer that the type of [ebp + 8] should be a type of size 32, while the last instruction suggests that the type of [ebp + 8] is int. Accordingly, both the types recovered for [ebp + 8] by Hex-Rays and Snowman are int, which is incorrect.…”
Section: Motivating Examplesmentioning
confidence: 99%
“…Consider (the stack frame of) a general function. In CDECL and STDCALL conventions, parameters and local variables are always accessed through address expressions of the form "[ebp + offset]" and "[ebp -offset]", respectively, where ebp is the stack base pointer register 2 . While in FASTCALL convention, the first two parameters are passed by the registers ecx and edx, the other parameters and local variables are handled as the same as the conventions above.…”
Section: B Binary Analysismentioning
confidence: 99%
See 1 more Smart Citation
“…Whenever one of the sides from an expression E⊕E ′ or E = E ′ is ranked as p and the other as n, e.g., M (E) = p and M (E ′ ) = n, we say that this expressions is inconsistent. A constraint associated with an inconsistent expression must be dropped, otherwise it will trigger an incompatible unification (called over-unification by Noonan et al [Noonan et al 2016]). Since this elimination occurs during generation stage, the effect to the solver is that the constraint never existed.…”
Section: Bin_optr Is the Assignment Expression(=)mentioning
confidence: 99%
“…On the contrary, we are trying to reconstruct them. Noonan et al [Noonan et al 2016] provide a type inference algorithm for machine code that relates to our work. Their tool, Retypd, works in a two-phase approach: 1) a sound inference algorithm constructed over a type-system richer and more powerful than the actual C type-system; 2) a heuristic-based translation mechanism that converts types from such type-system to C source.…”
Section: Related Workmentioning
confidence: 99%