From 539da7d18659562f7affde4c43124cb01b2939db Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 29 Oct 2026 22:55:08 -0700 Subject: [PATCH 1/2] chore(quest): claim quest/m1/quinn-sync.md Quest-Claim: 67b46f3f2239c1ed From 4ee50ec5a043a38b74f642baf5d1a4409af100c2 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 29 Oct 2026 23:05:41 -0700 Subject: [PATCH 2/2] fix(quic): sync quinn through 2697de1e Record f233510c and 6c69f9f4 as already held or not applying, and port 623a0369's specific_v6_addr test with the driver tests binding through moq_sock::bind. Roll the recurring quest into m2. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 - quest/m2/README.md | 1 + quest/{m1 => m2}/quinn-sync.md | 32 +++++++++++++---------- rs/moq-quic/README.md | 5 ++++ rs/moq-tokio/src/quic/driver/tests.rs | 37 ++++++++++++++++++++++----- 5 files changed, 54 insertions(+), 22 deletions(-) rename quest/{m1 => m2}/quinn-sync.md (62%) diff --git a/quest/m1/README.md b/quest/m1/README.md index 3f56b70aabd..b19a8db42f8 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -126,7 +126,6 @@ removed). - [Address groups by timestamp](/quest/m1/time-addressing/README.md) - group start timestamps replace sequence numbers in the moq-net API and lite-07 wire, while old subscribers, old publishers, and published JS clients keep working - [Release audit findings](/quest/m1/release-audit/README.md) - resolve newly identified resource, parser, playback, and interoperability risks before the cut - [Pre-cut audit findings](/quest/m1/cut-audit/README.md) - fix the crashes, hostile-input costs, and correctness bugs the 2026-10-24 audit of main found -- [moq-quic has every quinn fix it needs](/quest/m1/quinn-sync.md) - quinn's fixes since the fork point are ported with their tests, once per release cycle - [Security audit findings](/quest/m1/security-audit/README.md) - fix the verified relay, importer, moq-c, browser, and CI findings of the 2026-10-27 external security audit - [Withdrawn advertisements stop](/quest/m1/ietf-withdraw-credit.md) - a withdrawn moq-transport namespace releases its state even when the peer withholds credit - [Cluster routing](/quest/m1/cluster-routing/README.md) - prove shared routing contracts, implement per-origin routes, and connect outbound local clusters diff --git a/quest/m2/README.md b/quest/m2/README.md index f6d54a23242..5effa1e7302 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -27,6 +27,7 @@ lite-07; bitrate enforcement is not part of this release. - [VA-API renderer tests](/quest/m2/vaapi-render-tests.md) - the VA-API renderer, decode, and transcode tests run in `just rs gpu` on AMD and Intel and fail instead of skipping, and hosted CI reports them ignored - [Every opt-in test target has a CI caller](/quest/m2/test-inventory.md) - the merge gate flags ignored tests, fuzz and bench targets, recipes, and scripts no workflow runs - [Workflow and dependency security linting](/quest/m2/workflow-security.md) - zizmor gates workflow changes, and Nightly audits Go and Python dependencies +- [moq-quic has every quinn fix it needs](/quest/m2/quinn-sync.md) - quinn's fixes since the last sync are ported with their tests, once per release cycle - [Worklet bundler matrix and React hooks run in CI](/quest/m2/browser-test-gaps.md) - the worklet matrix runs nightly on pinned bundlers, and the React signal hooks have tests - [Every handwritten language has a format gate](/quest/m2/format-gates.md) - gofmt, ktfmt, swift-format, and clang-format join `just check`, and Ruff covers all Python - [Weekly mutation testing on critical modules](/quest/m2/mutants.md) - cargo-mutants runs weekly on moq-auth and moq-net's permission, resume, and expiry code diff --git a/quest/m1/quinn-sync.md b/quest/m2/quinn-sync.md similarity index 62% rename from quest/m1/quinn-sync.md rename to quest/m2/quinn-sync.md index fb9213730ad..013b9e1636b 100644 --- a/quest/m1/quinn-sync.md +++ b/quest/m2/quinn-sync.md @@ -15,26 +15,26 @@ quinn advisory in in-tree code, so checking upstream is recurring work. Each run: -- Compare quinn-rs/quinn `main` against the last checked commit (the fork - point [`7616e6b2`](https://github.com/quinn-rs/quinn/commit/7616e6b2782722f3ce4a1b181ef08817d7f545e4) - for the first run), plus quinn's GitHub security advisories. +- Compare quinn-rs/quinn `main` against the last checked commit, recorded + in the README's Upstream section (`main` at + [`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e1314cb9f98502b7323acd5bdd836b582) + and `0.11.x` at + [`4b84837d`](https://github.com/quinn-rs/quinn/commit/4b84837df1d25424bc37b0ed990e7b376d40a9c0) + after the first run), plus quinn's GitHub security advisories. - Port each fix that applies to code the fork still carries, with its regression test, and list it under the README's ported commits. Record one that does not apply with its reason, as the README already does. - Skip dependency bumps. + Skip dependency bumps and new features. - Record the newest upstream commit checked in the README, so the next run starts there. -First run: three fixes on quinn `main` are not in the ledger yet. Check -each against the fork's code before porting, since a missing ledger entry -does not prove the bug remains: -[`f233510c`](https://github.com/quinn-rs/quinn/commit/f233510c) (honor a -disabled idle timeout when accepting), -[`6c69f9f4`](https://github.com/quinn-rs/quinn/commit/6c69f9f4) (don't -credit a reset stream's unread data twice on stop; the fork rewrote `stop` -under the README's "Stream credit on stop", so it may already hold), and -[`623a0369`](https://github.com/quinn-rs/quinn/commit/623a0369) (don't make -specific IPv6 endpoints dual-stack). +Learned in the first run: a fix missing from the ledger is often already +held, since the fork reworked the same code (`stop` under +`RESET_STREAM_AT`, the stale-accept check under `handshake_timeout`, and +socket setup in `moq_sock::bind`), so check the fork's code before porting. +A fix to quinn's `Endpoint::client` or `server` lands in `moq_sock::bind`, +which the driver's test helpers bind through. Most of `0.11.x` is +backports of `main`; compare its commits by subject. Recurrence: the PR that finishes a run deletes this file and creates the next run at `/quest/m2/quinn-sync.md`, linked from `/quest/m2/README.md`'s @@ -47,6 +47,10 @@ next run becomes ready in the new m1, once per release cycle. Only Public API: none expected; a ported fix that changes one says so. Wire: QUIC behavior follows upstream's fixes. +## Required + +- [Release cut](/quest/m2/release/cut.md) - the release in flight ships before this run starts + ## Related - [moq-quic's API improves on quinn's](/quest/m1/quic-api/README.md) - renames that make each port a hand translation diff --git a/rs/moq-quic/README.md b/rs/moq-quic/README.md index f4f728d57be..b0bc7b82140 100644 --- a/rs/moq-quic/README.md +++ b/rs/moq-quic/README.md @@ -20,6 +20,11 @@ Ported since the fork point: - [`f74e6a8a`](https://github.com/quinn-rs/quinn/commit/f74e6a8a15e5aa980044b7fa03a31878c6a8c65c): check a DATAGRAM frame's encoded size against `max_datagram_frame_size`, and drop rather than refuse one whose queue metadata overflows the receive buffer, so a datagram of the advertised maximum size no longer closes the connection. - [`17596dde`](https://github.com/quinn-rs/quinn/commit/17596ddefb09dae895129520824055d0ac8da5d5) (`moq_sock::udp`): on Windows, query `IPV6_V6ONLY` only on IPv6 sockets, so Winsock refusing the option on an IPv4 socket cannot fail endpoint creation. - [`d3174f1e`](https://github.com/quinn-rs/quinn/commit/d3174f1e77e093ceadfe0edff865fdd92d51a03c): a `wasm32-unknown-unknown` build pulls in ring only through the `ring` feature. +- [`f233510c`](https://github.com/quinn-rs/quinn/commit/f233510cf37e1be9511070bf743151736d621a5e): a disabled idle timeout no longer abandons every accept as stale. Does not apply: the fork drops a stale Initial after `transport::Config::handshake_timeout`, which cannot be disabled, rather than the idle timeout. +- [`6c69f9f4`](https://github.com/quinn-rs/quinn/commit/6c69f9f4ed2362002a0e2e5312a6dfa3ceb31c1d): stopping a reset stream no longer credits its unread data twice. Already held: `Recv::unread_credit` counts only what a reset still owes below its Reliable Size (see `RESET_STREAM_AT` below), and `stop_after_reset_credits_once` covers it. +- [`623a0369`](https://github.com/quinn-rs/quinn/commit/623a0369536b9a1e731a8629c80c164eb8f2e637) (moq-tokio's `quic::driver`): an endpoint on a specific IPv6 address is not made dual-stack, so Windows does not refuse the driver's IPv4 socket options. `moq_sock::bind::udp` already did this; the driver's tests now bind through it, with upstream's `specific_v6_addr`. + +Checked through quinn `main` at [`2697de1e`](https://github.com/quinn-rs/quinn/commit/2697de1e1314cb9f98502b7323acd5bdd836b582) (2026-10-28), and the `0.11.x` branch through [`4b84837d`](https://github.com/quinn-rs/quinn/commit/4b84837df1d25424bc37b0ed990e7b376d40a9c0); start the next sync there. The fork never merges upstream, and takes the workspace's formatting and names, so upstream patches no longer apply. Upstream fixes are ported by hand, together with their regression tests. diff --git a/rs/moq-tokio/src/quic/driver/tests.rs b/rs/moq-tokio/src/quic/driver/tests.rs index a801caac8bc..b1c4b7f81cb 100755 --- a/rs/moq-tokio/src/quic/driver/tests.rs +++ b/rs/moq-tokio/src/quic/driver/tests.rs @@ -268,7 +268,7 @@ fn endpoint() -> Endpoint { EndpointFactory::new().endpoint() } -/// A dial-only endpoint on `addr`, dual-stack when the platform allows it for an IPv6 `addr` +/// A dial-only endpoint on `addr`, dual-stack when the platform allows it for an IPv6 wildcard fn client_endpoint(addr: SocketAddr) -> Result { Endpoint::new(endpoint::Config::default(), bind(addr)?) } @@ -279,12 +279,7 @@ fn server_endpoint(config: server::Config, addr: SocketAddr) -> Result io::Result { - let socket = socket2::Socket::new(socket2::Domain::for_address(addr), socket2::Type::DGRAM, None)?; - if addr.is_ipv6() { - let _ = socket.set_only_v6(false); - } - socket.bind(&addr.into())?; - Ok(socket.into()) + moq_sock::bind::udp(moq_sock::bind::Udp::new(addr)) } fn endpoint_with_config(transport_config: transport::Config) -> Endpoint { @@ -688,6 +683,34 @@ fn echo_v6() { }); } +/// Windows rejects the IPv4 options the driver sets on a dual-stack socket, so an endpoint on a +/// specific IPv6 address must be bound v6-only. +#[tokio::test] +#[cfg_attr( + any(target_os = "solaris", target_os = "illumos"), + ignore = "Fails on Solaris and Illumos" +)] +async fn specific_v6_addr() { + let _guard = subscribe(); + let addr = SocketAddr::new(IpAddr::V6(Ipv6Addr::LOCALHOST), 0); + + let cert = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap(); + let key = PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der()); + let cert = CertificateDer::from(cert.cert); + let server_config = server::Config::with_single_cert(vec![cert.clone()], key.into()).unwrap(); + let server = server_endpoint(server_config, addr).unwrap(); + + let mut roots = RootCertStore::empty(); + roots.add(cert).unwrap(); + let client = client_endpoint(addr).unwrap(); + client.set_default_client_config(client::Config::with_root_certificates(Arc::new(roots)).unwrap()); + + tokio::join!( + async { server.accept().await.unwrap().accept().unwrap().await.unwrap() }, + async { client.dial(server.local_addr(), "localhost").unwrap().await.unwrap() }, + ); +} + #[test] #[cfg_attr(target_os = "solaris", ignore = "Sometimes hangs in poll() on Solaris")] fn echo_v4() {