Translating vaddubm on big-endian PowerPC corrupts the heap and aborts
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- reverse-engineering
Línea de trabajo
Comienza en el punto de entrada pypcode.Context.translate y reproduce el caso vaddubm de cuatro bytes para PowerPC:BE:32:default y PowerPC:BE:64:default. Sigue la ruta de traducción big-endian de PowerPC y compárala con el caso little-endian que no provoca una interrupción. Se considera terminado cuando una entrada vaddubm válida ya no corrompe el heap ni provoca la interrupción del proceso.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Translating a single ordinary AltiVec instruction corrupts the heap and aborts
the process. Four bytes are enough, and the input is valid PowerPC — not
malformed or random data.
import pypcode
pypcode.Context("PowerPC:BE:32:default").translate(
b"\x10\x00\x00\x00", 0x1000,
max_instructions=99999, max_bytes=4,
flags=pypcode.TranslateFlags.BB_TERMINATING,
)
The process dies with SIGABRT and glibc reports heap corruption — variously
free(): invalid size and corrupted size vs. prev_size, which indicates an
out-of-bounds write rather than a bad read.
On big-endian PowerPC, 10 00 00 00 decodes as vaddubm v0,v0,v0 — vector add
unsigned byte modulo, an unremarkable AltiVec instruction that a compiler will
emit for ordinary vectorised code.
What I verified
| language | result |
|---|---|
PowerPC:BE:32:default |
SIGABRT, heap corruption reported by glibc |
PowerPC:BE:64:default |
SIGABRT, heap corruption reported by glibc |
PowerPC:LE:32:default |
no abort — those bytes are not vaddubm in this byte order |
So the trigger tracks the instruction rather than the language variant, as one
would expect.
This is current master: the checkout used is 559aacdc, which is master at
the time of writing, and it also reproduces on the released 4.0.0 wheel from
PyPI in a clean virtual environment, so it does not depend on a source build.
Why it is worth attention
Any consumer that lifts PowerPC through Sleigh can be killed outright by four
bytes of legitimate input, with no exception to catch and no opportunity to skip
the block. It surfaced during a survey of a large binary corpus, where it
accounted for a small number of objects only because most PowerPC there routes
through a different lifter — the object count understates the exposure rather
than bounding it.
I have not attempted a fix, and I am not proposing one here; the report is the
contribution. Happy to test a patch against the same input if that helps.
- Lenguaje dominante
- C++
- Estrellas
- 224
- Forks
- 33
- Merge medio
- 7 h 18 min
- PR fusionados (30 d)
- 10
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de angr/pypcode
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
angr/pypcode#293 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
Los mantenedores suelen responder en 1 día
-
Update to Ghidra 12.1.2Quizá libre de nuevo @mborgerson la tomó hace 134 días y no hay ningún pull request abierto. Abiertoenhancement
angr/pypcode#276 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Build with freethreadingAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de angr/pypcode
Issues similares
-
bug-unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Extended search mode does not find escape sequences (\t, \n, \r...)Posiblemente ocupada @CyrilB1531 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
dail8859/NotepadNext#1181 ·
Los mantenedores suelen responder en 1 día
-
A-tools P-low S-blocked task
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
☢️ Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OpenAtomFoundation/pikiwidb#3309 ·
-
audit(c2): add_project_arguments('/experimental:c11atomics', language: ['c', 'cpp']) for MS (C2-13)Abiertohygiene type:refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día