Repository navigation
machine, qmp: fuzz the record, CanResume and QMP's replies (#653) - #670
Merged
Merged
Conversation
…nameless fact (#653) FuzzARecordReadBack, FuzzCanResume and FuzzWhatQEMUSays hold what a checkpoint's record and the QMP client promise of any bytes: one form read back, a record that resumes into its own machine unless its format or VMM says otherwise, a Refusal naming each difference, and a connection that ends, without a panic, once QEMU's output does. FuzzCanResume found a record whose machine names a fact with no name: it was read, and a refusal then named a difference of nothing (": checkpoint 1, here none (same)"). newHardware refuses it now, and the input stays in testdata/fuzz as a regression test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
task fuzz finds the targets with go test -list and runs each for FUZZTIME, with minimization cut to 5 s: at its default minute a bounded run spent most of its time minimizing. ci.yml's fuzz job keeps the inputs a target failed on as an artifact, to commit with the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The goal is a cold boot to the first SSH login in under 100 ms. Functional and security work goes in beside it. #653 asks for fuzzing where input crosses a boundary (step 5a): a checkpoint's record is bytes spin stores and copies and hands back to
Resume, and QMP replies come from a QEMU a guest may have taken over.What
machine/fuzz_test.go.FuzzARecordReadBackholds that any bytes that read as aSavedwrite one form and read back the same. A record resumes into its own machine unless its format or VMM refuses it.CanResumereturns nil or aRefusal. Re-added vCPUs name only slot properties.FuzzCanResumeholds that any two records give nil or aRefusalnaming each difference, and nil only when the format is read. The seeds are the recordsrecord_test.gobuilds.qmp/fuzz_test.go.FuzzWhatQEMUSaysfeeds the client arbitrary output in turns, throughNew, twoDos decodingImageInfo, events andLast. It holds that nothing panics and that the connection ends with an error once QEMU's output ends.FuzzCanResumefound that a record whose machine names a fact with no name ({"value":"1"}) was accepted. A refusal of it then named nothing:: checkpoint 1, here none (same).newHardwarenow refuses an empty name. The input stays inmachine/testdata/fuzz/FuzzCanResumeas a regression test.task fuzzfinds the targets withgo test -list '^Fuzz'and runs each forFUZZTIME(60s by default). It sets-fuzzminimizetime 5s, because at the default minute a bounded run sat idle while it minimized.ci.yml's newfuzzjob runs it and keeps failing inputs as an artifact.Verified
go tool task lint test mutatepasses: coverage 93.46% against a floor of 93, and mutate has 0 survivors.Steps 4 and 5b of #653 (ASan/UBSan QEMU, QEMU fuzzing) follow in their own PR.
🤖 Generated with Claude Code