Contributing fuzz harnesses for the test suite

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

I maintainer di solito rispondono entro 23 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cmake, cpp, docker

Direzione di ricerca

Start by reading the existing test layout and build setup, then review the proposed parser and SNP harnesses and their notes about untrusted-byte entry points. The issue asks maintainers to decide where fuzz targets should live and how to build and run them, so seek that direction before preparing a contribution. Done means an agreed structure and integration approach, with harnesses runnable under the chosen setup.

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

Descrizione

Hi, in #410 you mentioned you would love to add fuzzing to the test suite. I have been building a set of fuzz harnesses
for GameNetworkingSockets and would like to contribute them upstream if that is useful, and I would rather match your
preferences on structure before sending a PR.

What I have:

  • A set of LLVMFuzzerTestOneInput harnesses (so they run under both libFuzzer and AFL++) over the receive-side parsers
    and state machines: the STUN and ICE candidate parsers, the UDP pre-connection handler, the SNP data-chunk decoder
    (single-packet, multi-packet and a grammar-shaped variant), the crypto handshake and certificate parsing, the
    inline-stats path, and the P2P signaling and connect-request paths. Several are structure-aware (libprotobuf-mutator
    over the real protobuf messages) so they get past the framing quickly.
  • They build against a pinned toolchain in a Docker image (pinned compiler, the current master commit of GNS) and run
    under AddressSanitizer + UndefinedBehaviorSanitizer, with authored seed corpora and small dictionaries.
  • A per-harness note on exactly what untrusted bytes reach which entry point, so the coverage is auditable.

Questions before I send anything:

  • Where would you want fuzz targets to live in the tree (a tests/fuzz/ directory, alongside the existing tests, or
    elsewhere), and how would you like them wired into the build (a CMake option, standalone)?
  • Do you want them shaped for OSS-Fuzz integration, or just as in-tree targets runnable locally?
  • Any conventions you would like followed for the harness entry points, the seed corpora, or the dictionaries?

I can start with the parser and SNP harnesses (the self-contained ones) and follow your lead on the rest. Anything found
through them I will report privately through your HackerOne program per SECURITY.md, not here.

Lingua principale
C++
Stelle
10.1k
Fork
781
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

  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 ValveSoftware/GameNetworkingSockets

Tutte le issue di ValveSoftware/GameNetworkingSockets

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.