Skip to content

Add puma fuzzing integration#15343

Open
tranquac wants to merge 3 commits intogoogle:masterfrom
tranquac:add-puma-fuzzing
Open

Add puma fuzzing integration#15343
tranquac wants to merge 3 commits intogoogle:masterfrom
tranquac:add-puma-fuzzing

Conversation

@tranquac
Copy link
Copy Markdown

New Project: puma

Adds continuous fuzzing for https://github.com/puma/puma — the default Ruby on Rails web server with 547M+ downloads — targeting its HTTP/1.1 request parser.

Motivation

Puma's HTTP parser has a documented history of critical security CVEs:

CVE Severity Type
CVE-2022-24790 CRITICAL (9.1) Request smuggling — parser diverges from RFC 7230
CVE-2023-40175 CRITICAL (9.8) Request smuggling via chunked encoding + zero Content-Length
CVE-2021-41136 LOW Request smuggling via LF in header values
CVE-2020-5247 HIGH Response splitting via CR/LF in headers
CVE-2024-45614 MEDIUM Header value clobbering

Continuous fuzzing would catch future regressions in this parser before they become security advisories.

Fuzz target

Target File Coverage
fuzz_http_parser ext/puma_http11/http11_parser.c (Ragel-generated, 1057 LOC) Standard parse + incremental (two-pass) parse via Puma::HttpParser#execute

Build notes

  • PUMA_DISABLE_SSL=1 skips mini_ssl.c (OpenSSL TLS wrapper) — the fuzzer targets only the HTTP parser
  • sed -i '/nio4r/d' puma.gemspec removes the nio4r runtime dependency, which is not needed for Puma::HttpParser and would otherwise cause MissingSpecError at load time
  • http11_parser.c is already committed (Ragel-generated); no Ragel required at build time

Build verification

  • build_image
  • build_fuzzers --sanitizer address
  • check_build --sanitizer address
  • Smoke test: clean run, no crashes

Seed corpus

8 HTTP/1.1 request fixtures: GET, POST with Content-Length, chunked encoding, OPTIONS, HEAD, partial request, and zero Content-Length + Transfer-Encoding (CVE-2023-40175 class).

Project maintainer: @nateberkopec (Nate Berkopec, nate.berkopec@gmail.com)

Adds continuous fuzzing for https://github.com/puma/puma — the default
Ruby on Rails web server (547M+ downloads) — targeting its HTTP/1.1
request parser, which has a history of critical CVEs:
  CVE-2022-24790 (CRITICAL) — request smuggling, RFC7230 mismatch
  CVE-2023-40175 (CRITICAL) — request smuggling via chunked encoding
  CVE-2021-41136           — request smuggling via LF in header values
  CVE-2020-5247            — response splitting via CR/LF injection

Fuzz target:
- fuzz_http_parser: exercises http11_parser.c (Ragel-generated, 1057 LOC)
  via Puma::HttpParser#execute with two variants — standard parse and
  incremental (two-pass) parse.

Build notes:
- PUMA_DISABLE_SSL=1 skips mini_ssl.c (OpenSSL wrapper); parser only
- sed removes nio4r runtime dep from gemspec (not needed for HttpParser)
- Ragel-generated http11_parser.c is committed; no Ragel required at build

Seed corpus: 8 HTTP/1.1 requests covering GET, POST, chunked encoding,
partial reads, and zero Content-Length (CVE-2023-40175 class).
Dictionary: HTTP methods, header names, CRLF sequences.
@github-actions
Copy link
Copy Markdown

tranquac is integrating a new project:
- Main repo: https://github.com/puma/puma
- Criticality score: 0.64750

Copy link
Copy Markdown

@nateberkopec nateberkopec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both comments are from my toaster, but I confirmed both of these things locally, so should be valid.

tranquac and others added 2 commits April 13, 2026 14:52
Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
Co-authored-by: Nate Berkopec <nate.berkopec@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants