test(fuzz): libFuzzer targets for the QUIC, HTTP/2, HTTP/3, HPACK and QPACK decoders

Aperta
#55 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
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c, github-actions

Direzione di ricerca

Start with the existing HTTP/1 targets in fuzz/fuzz_fastparse.c and fuzz/fuzz_chunked.c, and the make fuzz target, to see how a libFuzzer target is built and run under ASan and UBSan. Then read the entry points in hpack.h, qpack.h, h2.h, h3.h and quic.h to choose one decoder for a first target. Done means that target runs in CI, with its seed corpus and any crashes saved under fuzz/regressions/. The whole-connection targets and the remaining decoders are larger follow-up work.

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

Descrizione

enhancement P0: release blocker

libFuzzer only covers the HTTP/1 parsers today (fuzz/fuzz_fastparse.c, fuzz_fbparse.c, fuzz_batchparse.c, fuzz_chunked.c). Nothing fuzzes the other decoders of untrusted network input, and those are where memory-safety bugs in a C network stack would be:

  • quic.h: packet header and frame decoding, transport parameters, ACK ranges, stream reassembly
  • hpack.h and qpack.h: header block decoding, the dynamic tables, and QPACK encoder/decoder stream instructions
  • h2.h and h3.h: frame parsing and the stream state machines

Plan:

  1. One libFuzzer target per decoder, with seed corpora taken from the existing tests' traffic (nghttp2, nghttp3 and ngtcp2 runs).
  2. A whole-connection target: an established quic_conn (keys from a fixed handshake) fed fuzzed decrypted payloads, so the frame handlers are reached past packet protection. The same for h2_recv and h3_recv.
  3. Run them in CI with the HTTP/1 targets (make fuzz), and add their crashes to fuzz/regressions/.

Done when: every decoder above has a target running in CI under ASan and UBSan, and a long local run (hours per target) finds nothing open.

Lingua principale
C
Stelle
0
Fork
0
Merge medio
20h 4m
PR unite (30g)
25

Preparare l'ambiente

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 public/cursed-http

Tutte le issue di public/cursed-http

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.