Coverage and cmplog maps are aliased as multiple `&'static mut` across threads

Aperta
#410 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
44/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
security, testing

Direzione di ricerca

Start with src/fuzzer/mod.rs lines 130–157 and src/lib.rs lines 636–648 at the referenced commit. Trace how coverage and cmplog map pointers become observers and how the channel hand-off orders access between the SIMICS and fuzzer threads; the issue notes that the stop-without-reason path breaks that ordering. Done means removing the aliased mutable references while retaining observer access, then verifying the ownership and thread behavior.

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

Descrizione

Where

Problem
The cmplog map pointer becomes three live &'static mut (one in a OnceCell, two via Box::from_raw + Box::leak), and the coverage map two, used from the SIMICS thread and the fuzzer thread. Ordering relies only on the channel hand-off.

Impact
Undefined behaviour under Rust's aliasing rules; no miscompile observed. The stop-without-reason desync breaks the hand-off ordering.

Suggested fix
Keep raw pointers and build the observers from them.

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.