[repo] Fuzz: one libFuzzer target per parser, own workspace, Windows MSVC setup from Via

This commit is contained in:
2026-11-25 12:01:09 +01:00
parent 31d1fc3655
commit 3ade60d0b4
21 changed files with 1006 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes `/applist` answers: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::http::parse_app_list(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes audio packets: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::audio::parse_audio_packet(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes encrypted control frames (outer fields): never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::control::parse_encrypted_frame(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes decrypted control messages from the host: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::control::parse_host_message(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes ENet datagrams: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::enet::protocol::parse_datagram(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes INPUT_DATA messages: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::input::parse_input(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes `/launch` and `/resume` answers: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::http::parse_launch_response(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes pairing answers: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::pairing::parse_pair_response(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes the RTP header: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::rtp::parse_rtp_header(data);
});
+23
View File
@@ -0,0 +1,23 @@
//! Fuzzes the RTSP framer over a chunked byte stream: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
// First byte picks the chunk size, so libFuzzer explores message boundaries across pushes.
let Some((&chunk, rest)) = data.split_first() else { return };
let chunk = usize::from(chunk).max(1);
let mut framer = domistream::rtsp::RtspFramer::new();
for piece in rest.chunks(chunk) {
if framer.push(piece).is_err() {
return;
}
while let Ok(Some(message)) = framer.next_message() {
let _ = domistream::rtsp::parse_response(&message);
}
}
let _ = framer.finish();
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes RTSP requests: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::rtsp::parse_request(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes RTSP responses: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::rtsp::parse_response(data);
});
+13
View File
@@ -0,0 +1,13 @@
//! Fuzzes SDP payloads and the host capabilities read from them: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
if let Ok(sdp) = domistream::rtsp::sdp::parse_sdp(data) {
let _ = domistream::rtsp::HostCapabilities::from_sdp(&sdp);
}
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes the host certificate PEM (`plaincert`): never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::pairing::ServerCert::from_pem(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes `/serverinfo` answers: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::http::parse_server_info(data);
});
+12
View File
@@ -0,0 +1,12 @@
//! Fuzzes video packets and the frame header: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::video::parse_video_packet(data);
let _ = domistream::video::packet::parse_frame_header(data);
});
+11
View File
@@ -0,0 +1,11 @@
//! Fuzzes the XML reader behind every HTTP answer: never panics, whatever the bytes.
//! Phase A: the parser returns `Unimplemented`; QA adds the properties (round trips, caps) with the logic.
//! How to run: see the comment at the top of `fuzz/Cargo.toml`.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let _ = domistream::http::xml::parse(data);
});