Sleigh segfaults on short inputs for JVM, NDS32 and SPARC
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 reproduciendo las tres llamadas proporcionadas a pypcode.Context.translate en el commit 559aacdc para JVM, NDS32 y SPARC. Rastrea cada fallo a través de la definición de lenguaje SLEIGH relevante y del procesamiento de entrada, manteniendo la secuencia de SPARC en una sola llamada a translate. Se considera terminado cuando las tres entradas devuelvan resultados sin un segfault y puedan volver a probarse contra el parche.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Three Sleigh language definitions segfault on short byte sequences. They are
almost certainly three separate defects and can be split if that is easier to
triage — they are together here because they came out of one survey and share a
shape: a small input, no exception, the process gone.
All three reproduce on 559aacdc, which is master at the time of writing, and
each is a bare translate call with no other state.
1. JVM — tableswitch
pypcode.Context("JVM:BE:32:default").translate(
bytes.fromhex("aa873b8e6f50b409"), 0x1001,
max_instructions=99999, max_bytes=8,
flags=pypcode.TranslateFlags.BB_TERMINATING)
0xaa is tableswitch; 0xab (lookupswitch) fails the same way. Eight bytes.
2. NDS32
pypcode.Context("NDS32:LE:32:default").translate(
bytes.fromhex("26095d273add"), 0x1010,
max_instructions=99999, max_bytes=6,
flags=pypcode.TranslateFlags.BB_TERMINATING)
Six bytes.
3. SPARC
pypcode.Context("sparc:BE:32:default").translate(
bytes.fromhex("1728394a5b6c7d8e9fb0c1d2b01e0019"), 0x14,
max_instructions=99999, max_bytes=16,
flags=pypcode.TranslateFlags.BB_TERMINATING)
This one needs the whole run in a single translate call — no individual word
in that sequence crashes on its own, which I checked.
How much weight to put on these
Less than on the PowerPC report I opened alongside this one, and I would rather
say so than oversell. That case is an ordinary vaddubm that a compiler emits,
and it corrupts the heap. These three are short sequences that do not correspond
to code any toolchain produces, so they are robustness findings rather than
something a user meets on real input.
They still seem worth having. A lifter is routinely pointed at binaries whose
provenance is unknown, and there the distinction between "valid code" and
"arbitrary bytes" does not hold — the caller cannot know which it has until
after the lift, and a segfault gives no opportunity to skip the block.
I have not attempted fixes and am not proposing any. Happy to retest against a
patch.
- Lenguaje dominante
- C++
- Estrellas
- 222
- Forks
- 33
- Merge medio
- 7 h 13 min
- PR fusionados (30 d)
- 7
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
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
-
Update to Ghidra 12.1.2Quizá libre de nuevo @mborgerson la tomó hace 124 días y no hay ningún pull request abierto. Abiertoenhancement
-
Build with freethreadingAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Todos los issues de angr/pypcode
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nasa/fprime#6225 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
content good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
cpinitiative/usaco-guide#6699 ·
Los mantenedores suelen responder en 1 día
-
git: need better push commandAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
codepointerapp/codepointer#231 ·
-
[Feature]: Windows 语音输入默认关闭Abiertoenhancement source/qq
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
metasequoiaime/msime-windows#1054 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
amnezia-vpn/amnezia-client#3297 · 1 comentario ·
Los mantenedores suelen responder en 1 día