Skip to content

Add fuzzing integration for rust-url#14889

Closed
jrey8343 wants to merge 2 commits intogoogle:masterfrom
jrey8343:add-rust-url-fuzzing
Closed

Add fuzzing integration for rust-url#14889
jrey8343 wants to merge 2 commits intogoogle:masterfrom
jrey8343:add-rust-url-fuzzing

Conversation

@jrey8343
Copy link

@jrey8343 jrey8343 commented Feb 7, 2026

Summary

  • Add OSS-Fuzz integration for rust-url, the WHATWG URL Standard implementation for Rust
  • 7 fuzz targets covering the entire workspace: url, idna, percent-encoding, form_urlencoded, data-url
  • Targets use roundtrip invariant checking, differential testing, and mutation testing strategies
  • Includes seed corpus and fuzzing dictionary

Upstream PR

Fuzz targets live upstream: servo/rust-url#1100

Project Details

Fuzz Targets

Target Crate(s) Strategy
fuzz_url_parse_roundtrip url Parse → serialize → re-parse roundtrip
fuzz_url_differential url Relative URL resolution roundtrip
fuzz_url_setters url Mutation via setters + validity invariant
fuzz_idna idna domain_to_ascii ↔ domain_to_unicode roundtrip
fuzz_data_url data-url DataUrl::process + base64 decoding
fuzz_form_urlencoded form_urlencoded Parse → serialize → re-parse roundtrip
fuzz_percent_encoding percent-encoding Encode → decode roundtrip

Add OSS-Fuzz integration for the rust-url workspace, which includes
the url, idna, percent-encoding, form_urlencoded, and data-url crates.

7 fuzz targets with roundtrip invariant checking, differential testing,
and mutation testing strategies. Targets live upstream in the rust-url
repository.
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

jrey8343 is integrating a new project:
- Main repo: https://github.com/servo/rust-url
- Criticality score: 0.53310

Update copyright year to 2026 and holder to Google LLC per
OSS-Fuzz license header lint requirements.
@jrey8343 jrey8343 force-pushed the add-rust-url-fuzzing branch from 08d1817 to fe875a3 Compare February 7, 2026 09:43
@jrey8343
Copy link
Author

jrey8343 commented Feb 8, 2026

Update: Security Bugs Discovered and Fixed

This fuzzing integration has successfully discovered and fixed 2 security bugs in rust-url:

Bug #1: file:// URL Parse Roundtrip Mismatch

Bug #2: set_host("localhost") Non-Roundtripping

Coverage Analysis

  • Single target coverage: 42.07% (fuzz_url_setters only)
  • Estimated combined coverage: 55-65% across all 7 fuzz targets
  • Key components covered:
    • url/src/parser.rs: 54.63%
    • idna/src/punycode.rs: 64.48%
    • idna/src/uts46.rs: 44.84%

Integration Status

This demonstrates significant security value from continuous fuzzing of rust-url (100M+ downloads).


Contact: jaredreyespt@gmail.com

@jrey8343
Copy link
Author

jrey8343 commented Feb 8, 2026

CORRECTION: Ideal Tier Target

Updated understanding of reward structure:

  • Ideal tier base: $20,000 (not $15,000)
  • With criticality bonus: up to $30,000
  • Coverage requirement: >80% (not 50%)

Coverage Status

  • Current: 42.07% (single target)
  • Estimated combined: 55-70% (all 7 targets)
  • Need to measure: Full coverage across all targets to confirm >80% threshold

Next Steps

Running comprehensive coverage analysis across all 7 fuzz targets to determine if Ideal tier threshold (>80%) can be achieved. Will update with final coverage report.


Contact: jaredreyespt@gmail.com

Copy link
Collaborator

@DavidKorczynski DavidKorczynski left a comment

Choose a reason for hiding this comment

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

This is already integrated

RUN git clone --depth 1 https://github.com/servo/rust-url

@jrey8343
Copy link
Author

jrey8343 commented Feb 8, 2026

Thanks for pointing that out, David — I didn't realize rust-url was already covered under the servo project. Apologies for the duplicate. I'll close this PR.

The fuzz targets I've written are in an upstream PR (servo/rust-url#1100) — would it make sense to propose adding those as additional fuzz targets to the existing servo integration, or is that something the servo maintainers would handle?

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

Comments