Sleigh segfaults on short inputs for JVM, NDS32 and SPARC
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- reverse-engineering
Direzione di ricerca
Inizia riproducendo le tre chiamate fornite a pypcode.Context.translate al commit 559aacdc per JVM, NDS32 e SPARC. Risali da ciascun errore attraverso la definizione del linguaggio SLEIGH pertinente e la gestione dell'input, mantenendo la sequenza SPARC in un'unica chiamata a translate. Il lavoro è completato quando tutti e tre gli input restituiscono un risultato senza segfault e possono essere nuovamente testati rispetto alla patch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 221
- Fork
- 32
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di angr/pypcode
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
-
Update to Ghidra 12.1.2Forse di nuovo libera @mborgerson l’ha presa 115 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement
-
Build with freethreadingApertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di angr/pypcode
Issue simili
-
Status: Awaiting triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
espressif/arduino-esp32#12984 ·
I maintainer di solito rispondono entro 1 giorno
-
torch_ops/logprob.cu does not compile with the serving container's nvcc (13.3.73); check_torch_ops.py cannot run as shippedForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
ashhart/TensorFold#535 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 78/100
sudoevolve/EUI-NEO#95 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno