Executable tokenizer: questionable ELF section filter and panic on truncated PE/COFF

Aperta
#409 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
security, testing

Direzione di ricerca

Start with the referenced sections in src/fuzzer/tokenize/mod.rs and trace how ELF and PE/COFF sections are selected and sliced. Check how token_executables handles malformed inputs and whether PE files can be tokenized twice; the report says these concerns were found by static review but not reproduced under SIMICS. Done when useful allocated read-only ELF data is included and truncated PE/COFF input is skipped without panicking, with relevant tests or reproduction evidence.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Where

Problem
ELF: !is_executable() && !is_alloc() selects debug/strtab/comment sections and excludes .rodata/.data, where program strings live (may be intended). PE/COFF: contents[ptr..ptr+size] panics on a truncated file passed in token_executables. PE files may be tokenized twice if Coff::parse also succeeds.

Impact
Few useful tokens from ELF targets; a malformed file in token_executables panics the module.

Suggested fix
Include allocated read-only data sections; use contents.get(..) and skip bad sections.

Status
Reported by static code review at 79972db; not yet re-verified line by line. Found by reading the code; not reproduced under SIMICS.

Lingua principale
Rust
Stelle
335
Fork
26
Merge medio
1g 50m
PR unite (30g)
12

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di intel/tsffs

Tutte le issue di intel/tsffs

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.