Skip to content

test(fuzz): add fuzz targets for paths, ranges and WebDAV parsing - #401

Merged
BryanFRD merged 1 commit into
mainfrom
test/fuzzing
Oct 31, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
test/fuzzing

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Adds a cargo-fuzz crate under fuzz/ and a nightly workflow calling the shared reusable.

Targets:

  • node_path: parse_path never yields a segment with a separator, ./.., a control character or more than 255 bytes, and re-parsing the joined result is stable.
  • rel_path: RelPath::parse is idempotent and to_path stays inside its root with only normal components.
  • range_plan: ranges::plan never returns a partial range with start > end or end >= size.
  • propfind: PROPFIND body parsing does not panic on arbitrary XML.
  • lock_headers: If, Lock-Token and Timeout parsing returns only tokens present in the header and a positive timeout.

dav::propfind is now pub mod so the target can reach it; no behavior change.

Ran each target for 60 s locally (0.9M to 3.5M executions each), no findings.

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
@BryanFRD
BryanFRD enabled auto-merge (squash) October 31, 2026 10:25

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve: the fuzz targets only use public APIs, and every assertion I checked against the parsers holds. Nothing blocking.

@ferrfleet-interne

Copy link
Copy Markdown

Ready to merge. The code review found no issues, and formal verification failed to run, so there is no result from it.

Review

This PR adds five cargo-fuzz targets (node paths, RelPath, Range planning, PROPFIND bodies, lock headers) and a nightly workflow (.github/workflows/fuzz.yml). The only production change is api/src/dav/mod.rs:5, which makes dav::propfind public so the fuzz target can call it. Every target uses public APIs. The reviewer checked each assertion against the parser source and found they hold. No findings.

Formal verification

The formal-verify step failed and returned no result. No properties were checked, and this is not evidence either way.

@BryanFRD
BryanFRD merged commit cdb789b into main Oct 31, 2026
9 checks passed
@BryanFRD
BryanFRD deleted the test/fuzzing branch October 31, 2026 10:38
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.

1 participant