目录
christeg

fix: panic on Initial packets with a zero-length DCID (#5) (#533)

  • fix: panic on Initial packets with a zero-length DCID

A remote unauthenticated attacker can crash a QUIC server with only two packets:

  1. Send an Initial packet with a zero-length DCID and a garbage token, which triggers the server to issue a Retry token embedding the zero-length DCID as the odcid.
  2. Replay the poisoned Retry token; the decoded odcid is restored to None, and the server panics on token.odcid.unwrap().

This patch applies defense in depth:

  • endpoint: drop the first Initial packet with a DCID shorter than 8 bytes, as required by RFC 9000 Section 7.2. The DCID of a subsequent Initial packet carrying a valid Retry token is not affected.
  • endpoint: replace token.odcid.unwrap() with explicit error handling.
  • token: reject encoding/decoding Retry tokens whose odcid is shorter than 8 bytes, as required by RFC 9000 Section 8.1.2.1.
  • tests: fix missing assertions in address_token tests and add regression tests for the poisoned tokens.
  • ci: fix static analysis and unit testing workflows
  • Pin typos-cli to 1.42.3: the latest release (1.50.3) requires rustc 1.95, which is newer than the toolchain pinned in this repository (1.90.0). 1.42.3 is the newest release whose MSRV (1.87) is compatible.
  • Skip the Codecov upload step when no CODECOV_TOKEN is available (e.g. on forks, which do not inherit upstream secrets), instead of failing the whole unit testing job.
  • fixup: correct RFC reference and drop unused import
  • Remove the unused MAX_CID_LEN import in token.rs.
  • Correct the RFC 9000 reference: Retry tokens are described in Section 8.1.2 (Address Validation Using Retry Packets); there is no Section 8.1.2.1.
21天前374次提交

TQUIC

License Build Status codecov docs.rs Website OpenSSF Best Practices

English | 中文

TQUIC is a high-performance, lightweight, and cross-platform library for the IETF QUIC protocol.

Advantages

  • High performance: TQUIC is designed for high performance and low latency. Relevant details can be found in the benchmark result.

  • Pluggable congestion control: TQUIC supports various congestion control algorithms, including CUBIC, BBR, BBRv3, and COPA.

  • Multipath QUIC: TQUIC supports Multipath to enable the simultaneous usage of multiple paths for a single connection.

  • Easy to Use: TQUIC is easy to use. It supports flexible settings and detailed observability.

  • Cross platform: TQUIC runs on almost anything to which Rust compiles. It provides APIs for Rust/C/C++.

  • Powered by Rust: TQUIC is written in a memory safety language and immune to Buffer Overflow vulnerability and other memory-related bugs.

  • High quality: Extensive automated testing, including unit testing, fuzz testing, integration testing, performance benchmarking, interoperability testing, and more.

  • Protocol Compliance: TQUIC has been verified by formal specification using the Ivy tool. It has also passed IETF interoperability tests.

  • Rich features: TQUIC supports all big features conforming with QUIC, HTTP/3 RFCs.

Getting Started

Running the tests

Documentation

Contributing

  • Please create an issue in issue list.
  • Contact Committers/Owners for further discussion if needed.
  • See the CONTRIBUTING file for details.

Communication

License

TQUIC is under the Apache 2.0 license. See the LICENSE file for details.

邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9 京公网安备 11010802047560号