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

オープン
#55 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c, github-actions

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C
スター
0
フォーク
0
平均マージ
20時間 4分
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

public/cursed-http のほかの issue

public/cursed-http の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。