Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .config/hakari.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ platforms = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-pc-win
# exact-versions = true

[traversal-excludes]
workspace-members = ["moq-mux-fuzz", "moq-net-fuzz", "moq-quic-fuzz", "moq-rtmp-fuzz"]
workspace-members = ["moq-mux-fuzz", "moq-net-fuzz", "moq-quic-fuzz", "moq-rtmp-fuzz", "moq-sock-fuzz", "moq-uring-fuzz"]

[final-excludes]
workspace-members = ["kio-macros"]
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ jobs:
# `js worklet-matrix` loads `?worklet` output through the bundlers pinned in test/worklet.
recipe: ["gate", "gh test-integration", "rs doctest --workspace", "test drill-sensitivity", "rs uring", "test drain", "test json-properties", "test resume-model", "test route-key-model", "test route-sweep", "rs quic-sim", "rs rung-disable", "test drill impaired", "rs cli-export", "rs hls-conformance", "rs quic-stress", "rs audio-devices", "rs multicast", "rs render-sw", "test qmux", "rs v4l2", "js worklet-matrix"]
include:
# Miri interprets kio's and moq-net's in-memory unsafe; too slow for the merge gate.
# Miri interprets kio's and moq-net's in-memory unsafe and moq-sock's and moq-uring's
# control-message walks; too slow for the merge gate.
- recipe: rs miri
nightly: true
components: miri, rust-src
Expand Down Expand Up @@ -817,7 +818,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [lite, announce, ietf, varint, path, pattern, ingest, request, session_lite, session_ietf, packet, params, streamid, streams, frame, connection, fmp4, mkv, ts, flv, cmaf, annexb, catalog, amf0]
target: [lite, announce, ietf, varint, path, pattern, ingest, request, session_lite, session_ietf, packet, params, streamid, streams, frame, connection, fmp4, mkv, ts, flv, cmaf, annexb, catalog, amf0, sock_cmsg, uring_cmsg]
# A whole session runs at 50 to 90 inputs a second, and its coverage still climbs
# after five minutes, so it gets fifteen.
include:
Expand Down
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
[workspace]
# Keep source-only members discoverable in Maturin's dependency-pruned archive,
# including the separately packaged UniFFI generator.
members = ["rs/*", "rs/kio/macros", "rs/moq-mux/fuzz", "rs/moq-net/fuzz", "rs/moq-quic/fuzz", "rs/moq-rtmp/fuzz"]
members = [
"rs/*",
"rs/kio/macros",
"rs/moq-mux/fuzz",
"rs/moq-net/fuzz",
"rs/moq-quic/fuzz",
"rs/moq-rtmp/fuzz",
"rs/moq-sock/fuzz",
"rs/moq-uring/fuzz",
]
default-members = [
"rs/bench-harness",
"rs/kio",
Expand Down
87 changes: 87 additions & 0 deletions nix/Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ m4 default, so changes are proven before they ship: the
[sim rule checks](/quest/m1/quic-sim-rules.md),
[relay parser fuzz targets](/quest/m1/fuzz-relay-parsers.md), and from m4
the relay on the sim (landed),
[mutation testing](/quest/m1/mutants.md), and
[peer-reachable unsafe](/quest/m1/wire-fuzz-coverage.md). OSS-Fuzz stays in m4 (maintainer, same round): it mostly waits on
[mutation testing](/quest/m1/mutants.md), and peer-reachable unsafe. OSS-Fuzz stays in m4 (maintainer, same round): it mostly waits on
google/oss-fuzz.
Left in m4 without a pick: Kani, Miri seeds and TSan, the JS corpus, and
bindings interop.
Expand Down
1 change: 0 additions & 1 deletion quest/m1/fuzz-relay-parsers.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ Public API: none. Wire: none.

## Related

- [Peer-reachable unsafe](/quest/m1/wire-fuzz-coverage.md) - the moq-sock, moq-uring, and moq-c targets
- [OSS-Fuzz](/quest/m4/oss-fuzz.md) - runs these around the clock once it lands
30 changes: 0 additions & 30 deletions quest/m1/wire-fuzz-coverage.md

This file was deleted.

4 changes: 0 additions & 4 deletions quest/m4/codec-kani.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,3 @@ the way a model can.
timeout to hide it.

Public API: none. Wire: none.

## Related

- [Wire fuzz coverage](/quest/m1/wire-fuzz-coverage.md) - the fuzz targets and Miri run beside these proofs
1 change: 0 additions & 1 deletion quest/m4/miri-seeds-tsan.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ Public API: none. Wire: none.

## Related

- [Wire fuzz coverage](/quest/m1/wire-fuzz-coverage.md) - adds moq-uring and moq-sock to the same Miri recipe
- [Drop kio's epoch fence](/quest/m5/crossbeam-pin-fence.md) - the ordering in kio's log these runs watch
6 changes: 1 addition & 5 deletions quest/m4/oss-fuzz.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ maintainer's account once the maintainer has reviewed its draft files and PR
text (rejected: waiting to decide). The maintainer accepts OSS-Fuzz's 90-day
disclosure deadline.

Nightly gives each of its 22 codec targets five minutes and the two
Nightly gives each of its 24 codec targets five minutes and the two
whole-session targets (`session_lite`, `session_ietf`) fifteen. That finds
shallow bugs and replays the corpus; it rarely reaches deep states, and the
session targets' coverage still climbs when their run ends.
Expand All @@ -42,7 +42,3 @@ session targets' coverage still climbs when their run ends.
handled: reproduce, fix on `main`, commit the input, backport when serious.

Public API: none. Wire: none.

## Related

- [Wire fuzz coverage](/quest/m1/wire-fuzz-coverage.md) - adds the moq-sock and moq-uring targets OSS-Fuzz would also run
4 changes: 0 additions & 4 deletions quest/m5/errqueue-truncation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ Moved to m5 2026-11-12 (maintainer, /quest-audit): no consumer; parked rather th
Decided 2026-11-01 (maintainer, follow-up planning after the 2026-11-01 /quest-afk run): match the receive paths. Walk the cmsgs that fit (the iterator is already bounded by the returned control length), return the decoded entry if one is complete, and warn once through a `Once` as `decode_recv` in `unix.rs` does. Extend the existing mocked `MSG_ERRQUEUE` test (`LinuxError::decode`, about line 309) with a truncated case.

Public API: none. Wire: none.

## Related

- [Wire fuzz coverage](/quest/m1/wire-fuzz-coverage.md) - fuzzes the cmsg walks this path shares
2 changes: 1 addition & 1 deletion rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ set working-directory := '..'
# needs a nightly toolchain and sanitizer flags, so `just rs fuzz` is the one recipe
# that may compile it. Every `--workspace` below therefore carries this, as does
# sh/rs/select.sh, since it cannot read this.
no_fuzz := "--exclude moq-net-fuzz --exclude moq-quic-fuzz --exclude moq-mux-fuzz --exclude moq-rtmp-fuzz"
no_fuzz := "--exclude moq-net-fuzz --exclude moq-quic-fuzz --exclude moq-mux-fuzz --exclude moq-rtmp-fuzz --exclude moq-sock-fuzz --exclude moq-uring-fuzz"

default:
just check
Expand Down
12 changes: 12 additions & 0 deletions rs/moq-sock/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ rust-version.workspace = true
keywords = ["quic", "networking", "reuseport"]
categories = ["network-programming"]

[features]
# Exposes the `fuzz/` harness's target body and seeds through the `udp::fuzz` module, on 64-bit
# Linux. Off by default.
fuzz = []

[dependencies]
arc-swap = "1.9"
core_affinity = "0.8"
Expand All @@ -35,6 +40,13 @@ workspace-hack = { path = "../workspace-hack" }
[target.'cfg(target_vendor = "apple")'.dev-dependencies]
nix = { workspace = true }

# Writes the generated fuzzer corpus to disk. Needs the `fuzz` feature, so a default
# `--all-targets` build skips it rather than failing to find the module.
[[example]]
name = "fuzz-seeds"
path = "examples/fuzz-seeds.rs"
required-features = ["fuzz"]

[[bench]]
name = "demux"
harness = false
Expand Down
30 changes: 30 additions & 0 deletions rs/moq-sock/examples/fuzz-seeds.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//! Write the generated fuzzer corpus to disk: `fuzz-seeds <dir>` fills
//! `<dir>/<target>/` with one file per seed.
//!
//! `just rs fuzz` runs this before each session, so the corpus always matches the
//! inputs in `moq_sock::udp::fuzz` rather than whatever was generated last. The
//! target exists only on 64-bit Linux, so elsewhere this writes nothing.

#[cfg(all(target_os = "linux", target_pointer_width = "64"))]
fn main() {
let root = std::env::args().nth(1).expect("usage: fuzz-seeds <dir>");
let root = std::path::Path::new(&root);

for (target, _) in moq_sock::udp::fuzz::TARGETS {
let dir = root.join(target);
std::fs::create_dir_all(&dir).expect("could not create the seed directory");
}

let seeds = moq_sock::udp::fuzz::seeds();
for (index, seed) in seeds.iter().enumerate() {
let path = root.join(seed.target).join(format!("{index}.bin"));
std::fs::write(&path, &seed.data).expect("could not write a seed");
}

println!("wrote {} seeds to {}", seeds.len(), root.display());
}

#[cfg(not(all(target_os = "linux", target_pointer_width = "64")))]
fn main() {
eprintln!("the fuzz targets run only on 64-bit Linux");
}
5 changes: 5 additions & 0 deletions rs/moq-sock/fuzz/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
corpus
seeds
artifacts
coverage
Loading