Skip to content

fuzzers: AI-assisted cleanups#3754

Merged
smalis-msft merged 2 commits into
microsoft:mainfrom
smalis-msft:fuzzer-cleanup
Jun 18, 2026
Merged

fuzzers: AI-assisted cleanups#3754
smalis-msft merged 2 commits into
microsoft:mainfrom
smalis-msft:fuzzer-cleanup

Conversation

@smalis-msft

Copy link
Copy Markdown
Contributor

General cleanups to all of our fuzzers that should make them more efficient and have slightly better coverage, as well as fix some missing init_tracing_if_repro calls.

Copilot AI review requested due to automatic review settings June 16, 2026 19:27
@smalis-msft smalis-msft requested review from a team as code owners June 16, 2026 19:27
@smalis-msft smalis-msft enabled auto-merge (squash) June 16, 2026 19:27
@github-actions github-actions Bot added the unsafe Related to unsafe code label Jun 16, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Unsafe Code Detected

This PR modifies files containing unsafe Rust code. Extra scrutiny is required during review.

For more on why we check whole files, instead of just diffs, check out the Rustonomicon

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR performs targeted cleanups across multiple fuzz targets in the OpenVMM workspace to improve fuzzing efficiency/corpus quality and to make repro runs more diagnosable by consistently initializing tracing.

Changes:

  • Improve input utilization and behavior modeling in several fuzzers (e.g., more realistic/varied request bytes and richer action selection).
  • Add/standardize xtask_fuzz::init_tracing_if_repro() calls in fuzz targets that were missing them.
  • Switch some fuzzers to return libfuzzer_sys::Corpus and reject unproductive inputs, and simplify fuzz-crate deps accordingly.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
vm/devices/storage/storvsp/fuzz/fuzz_storvsp.rs Makes REPORT_LUNS CDB contents less trivial by consuming more fuzz input.
vm/devices/storage/scsi_buffers/fuzz/fuzz_scsi_buffers.rs Adds init_tracing_if_repro() in the fuzz entrypoint.
vm/devices/storage/disk_nvme/nvme_driver/fuzz/fuzz_nvme_driver.rs Reworks to pass Unstructured through APIs; simplifies GUID generation from fuzz bytes.
vm/devices/storage/disk_nvme/nvme_driver/fuzz/fuzz_main.rs Removes global input state; uses Unstructured directly and rejects malformed inputs via Corpus.
vm/devices/storage/disk_nvme/nvme_driver/fuzz/Cargo.toml Drops parking_lot and removes unused-deps ignore now that libfuzzer-sys is referenced directly.
vm/devices/firmware/firmware_uefi/fuzz/fuzz_diagnostics.rs Rejects empty-memory cases via Corpus and returns arbitrary::Result<()> from do_fuzz.
vm/devices/firmware/firmware_uefi/fuzz/Cargo.toml Removes unused-deps ignore now that libfuzzer-sys is referenced directly.
vm/devices/chipset/fuzz/fuzz_cmos_rtc.rs Introduces explicit fuzz actions (chipset event vs time manipulation) to exercise more time-related behavior.
vm/devices/chipset/fuzz/fuzz_battery.rs Introduces explicit fuzz actions to interleave chipset events with battery updates.
support/ucs2/fuzz/fuzz_ucs2.rs Adds init_tracing_if_repro() in the fuzz entrypoint.
support/sparse_mmap/fuzz/fuzz_sparse_mmap.rs Simplifies expected-error handling and adds missing init_tracing_if_repro().
Cargo.lock Removes parking_lot from the nvme_driver fuzz crate dependency set.

Comment thread vm/devices/firmware/firmware_uefi/fuzz/fuzz_diagnostics.rs
Comment thread vm/devices/storage/disk_nvme/nvme_driver/fuzz/fuzz_main.rs
@smalis-msft smalis-msft merged commit f31c5f7 into microsoft:main Jun 18, 2026
67 checks passed
@smalis-msft smalis-msft deleted the fuzzer-cleanup branch June 18, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

unsafe Related to unsafe code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants