rust-vmm / vm-virtio

virtio implementation
Apache License 2.0
361 stars 87 forks source link

virtio-queue: fix various crashes in mock queue #253

Closed 00xc closed 1 year ago

00xc commented 1 year ago

Summary of the PR

Replace a few instances of unwrap() that could cause crashes during fuzzing runs with a returned error. Introduce a new MockError variant for errors accessing guest memory.

These crashes were found with the fuzzer in #246 (e.g. https://buildkite.com/rust-vmm/vm-virtio-ci/builds/858#01890e21-2688-4fbe-a801-822f5dae4dae).

Requirements

Before submitting your PR, please make sure you addressed the following requirements: