Lifting assistance with a conditional branch.

Abierto
#1,908 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado

Línea de trabajo

No file or test is identified. Start by locating the lifting logic for conditional branches and the handling of pop(), cmp_ne(), set_reg(), and dangling IL statements. Define which obviously dangling statements should trigger a diagnostic, then add coverage showing that the conditional pop is detected and valid lifting remains unaffected.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Component: Core Core: LLIL Effort: Low Impact: Medium

This is a feature request for sanity checks on some lifting.

I ran across a particular hard to debug instance of this. I am lifting a stack machine which has a conditional branch instruction that is something like:

if pop() != 0:
  // true path
else:
  // fall through

Originally, I lifted this by creating a cmp_ne(pop(), const(0)) expression. However, this is subtly incorrect -- the stack adjustment from the pop in the conditional will never be be applied as control flow passes to either the true or false branch before its committed. This is extremely hard to detect/debug, because by all appearances this initially looks correct: there is a conditional that does look at the top stack value, its just implemented as a peek() instead of a pop() in effect. The correct lifting for this ended up being something like set_reg(t0, pop()); cmp_ne(reg(t0), const(0)).

The feature request here is when there are some obviously dangling il statements that the user should be notified.

Lenguaje dominante
C++
Estrellas
1.3k
Forks
298
Merge medio
5 d 5 h
PR fusionados (30 d)
19

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Vector35/binaryninja-api

Todos los issues de Vector35/binaryninja-api

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.