Contributing fuzz harnesses for the test suite

Ouverte
#475 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 23 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
cmake, cpp, docker
Domaine
networking, testing

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
C++
Étoiles
10.1k
Forks
781
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de ValveSoftware/GameNetworkingSockets

Toutes les issues de ValveSoftware/GameNetworkingSockets

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.