2020-07-16 14:44:36 +00:00
|
|
|
[package]
|
|
|
|
authors = ["Automatically generated"]
|
2022-04-08 15:11:04 +00:00
|
|
|
edition = "2021"
|
2024-05-08 08:56:31 +00:00
|
|
|
name = "cloud-hypervisor-fuzz"
|
|
|
|
publish = false
|
|
|
|
version = "0.0.0"
|
2020-07-16 14:44:36 +00:00
|
|
|
|
|
|
|
[package.metadata]
|
|
|
|
cargo-fuzz = true
|
|
|
|
|
2023-10-05 01:07:45 +00:00
|
|
|
[features]
|
|
|
|
igvm = []
|
|
|
|
|
2020-07-16 14:44:36 +00:00
|
|
|
[dependencies]
|
2023-07-12 02:24:28 +00:00
|
|
|
block = { path = "../block" }
|
2022-07-26 15:30:56 +00:00
|
|
|
devices = { path = "../devices" }
|
2024-04-06 07:47:54 +00:00
|
|
|
epoll = "4.3.3"
|
2024-05-21 23:36:55 +00:00
|
|
|
libc = "0.2.155"
|
2023-08-11 23:19:24 +00:00
|
|
|
libfuzzer-sys = "0.4.7"
|
2024-06-18 14:22:36 +00:00
|
|
|
linux-loader = { version = "0.11.0", features = ["bzimage", "elf", "pe"] }
|
2022-07-29 00:07:32 +00:00
|
|
|
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
|
2022-11-23 23:23:00 +00:00
|
|
|
net_util = { path = "../net_util" }
|
2023-12-13 23:45:07 +00:00
|
|
|
once_cell = "1.19.0"
|
2023-10-30 18:31:10 +00:00
|
|
|
seccompiler = "0.4.0"
|
2020-07-20 15:41:40 +00:00
|
|
|
virtio-devices = { path = "../virtio-devices" }
|
2024-05-01 08:35:15 +00:00
|
|
|
virtio-queue = "0.12.0"
|
2024-05-08 08:56:31 +00:00
|
|
|
vm-device = { path = "../vm-device" }
|
2024-03-21 23:13:54 +00:00
|
|
|
vm-memory = "0.14.1"
|
vmm: use trait objects for API actions
Uses of the old ApiRequest enum conflated two different concerns:
identifying an API request endpoint, and storing data for an API
request. This led to ApiRequest values being passed around with junk
data just to communicate a request type, which forced all API request
body types to implement Default, which in some cases doesn't make any
sense — what's the "default" path for a vhost-user socket? The
nonsensical Default values have led to tests relying on being able to
use nonsensical data, which is an impediment to adding better
validation for these types.
Rather than having API request types be represented by an enum, which
has to carry associated body data everywhere it's used, it makes more
sense to represent API request types as trait objects. These can have
an associated type for the type of the request body, and this makes it
possible to pass API request types and data around as siblings in a
type-safe way without forcing them into a single value even where it
doesn't make sense. Trait objects also give us dynamic dispatch,
which lets us get rid of several large match blocks.
To keep it possible to fuzz the HTTP API, all the Vmm methods called
by the HTTP API are pulled out into a trait, so the fuzzer can provide
its own stub implementation of the VMM.
Signed-off-by: Alyssa Ross <hi@alyssa.is>
2024-01-05 14:08:53 +00:00
|
|
|
vm-migration = { path = "../vm-migration" }
|
2022-07-26 15:30:56 +00:00
|
|
|
vm-virtio = { path = "../vm-virtio" }
|
2024-05-08 08:56:31 +00:00
|
|
|
vmm = { path = "../vmm", features = ["guest_debug"] }
|
|
|
|
vmm-sys-util = "0.12.1"
|
2020-07-16 14:44:36 +00:00
|
|
|
|
|
|
|
# Prevent this from interfering with workspaces
|
|
|
|
[workspace]
|
|
|
|
members = ["."]
|
|
|
|
|
2022-09-16 20:35:09 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-09-16 20:35:09 +00:00
|
|
|
name = "balloon"
|
|
|
|
path = "fuzz_targets/balloon.rs"
|
|
|
|
test = false
|
|
|
|
|
2020-07-16 14:44:36 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-27 09:35:22 +00:00
|
|
|
name = "block"
|
|
|
|
path = "fuzz_targets/block.rs"
|
2020-07-16 14:44:36 +00:00
|
|
|
test = false
|
2020-07-20 15:41:40 +00:00
|
|
|
|
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-27 09:35:22 +00:00
|
|
|
name = "cmos"
|
|
|
|
path = "fuzz_targets/cmos.rs"
|
2020-07-20 15:41:40 +00:00
|
|
|
test = false
|
2021-08-02 15:51:36 +00:00
|
|
|
|
2022-11-01 20:39:45 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-11-01 20:39:45 +00:00
|
|
|
name = "console"
|
|
|
|
path = "fuzz_targets/console.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-07-29 00:07:32 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-29 00:07:32 +00:00
|
|
|
name = "http_api"
|
|
|
|
path = "fuzz_targets/http_api.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-10-18 22:12:55 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-10-18 22:12:55 +00:00
|
|
|
name = "iommu"
|
|
|
|
path = "fuzz_targets/iommu.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-12-06 00:53:13 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-12-06 00:53:13 +00:00
|
|
|
name = "linux_loader"
|
|
|
|
path = "fuzz_targets/linux_loader.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-12-07 19:32:14 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-12-07 19:32:14 +00:00
|
|
|
name = "linux_loader_cmdline"
|
|
|
|
path = "fuzz_targets/linux_loader_cmdline.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-10-11 01:18:19 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-10-11 01:18:19 +00:00
|
|
|
name = "mem"
|
|
|
|
path = "fuzz_targets/mem.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-11-23 23:23:00 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-11-23 23:23:00 +00:00
|
|
|
name = "net"
|
|
|
|
path = "fuzz_targets/net.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-09-12 23:46:44 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-09-12 23:46:44 +00:00
|
|
|
name = "pmem"
|
|
|
|
path = "fuzz_targets/pmem.rs"
|
|
|
|
test = false
|
|
|
|
|
2021-08-02 15:51:36 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-27 09:35:22 +00:00
|
|
|
name = "qcow"
|
|
|
|
path = "fuzz_targets/qcow.rs"
|
2021-08-02 15:51:36 +00:00
|
|
|
test = false
|
2022-07-26 15:30:56 +00:00
|
|
|
|
2022-09-19 23:43:10 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-09-19 23:43:10 +00:00
|
|
|
name = "rng"
|
|
|
|
path = "fuzz_targets/rng.rs"
|
|
|
|
test = false
|
|
|
|
|
2022-07-26 15:30:56 +00:00
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-26 15:30:56 +00:00
|
|
|
name = "serial"
|
|
|
|
path = "fuzz_targets/serial.rs"
|
|
|
|
test = false
|
2022-07-26 15:30:56 +00:00
|
|
|
|
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-07-27 09:35:22 +00:00
|
|
|
name = "vhdx"
|
|
|
|
path = "fuzz_targets/vhdx.rs"
|
2022-07-26 15:30:56 +00:00
|
|
|
test = false
|
2022-09-15 23:16:16 +00:00
|
|
|
|
|
|
|
[[bin]]
|
2024-05-08 08:56:31 +00:00
|
|
|
doc = false
|
2022-09-15 23:16:16 +00:00
|
|
|
name = "watchdog"
|
|
|
|
path = "fuzz_targets/watchdog.rs"
|
|
|
|
test = false
|