Contributing fuzz harnesses for the test suite

未关闭
#475 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 23 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
cmake, cpp, docker

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C++
星标
10.1k
派生
781
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ValveSoftware/GameNetworkingSockets 的其他 Issue

查看 ValveSoftware/GameNetworkingSockets 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。