Advisory Database
  • Advisories
  • Dependency Scanning
  1. cargo
  2. ›
  3. quinn
  4. ›
  5. CVE-2021-28036

CVE-2021-28036: quinn invalidly assumes the memory layout of std::net::SocketAddr

August 25, 2021 (updated June 13, 2023)

The quinn crate has assumed std::net::SocketAddrV4 and std::net::SocketAddrV6 have the same memory layout as the system C representation sockaddr. It has simply casted the pointers to convert the socket addresses to the system representation. The standard library does not say anything about the memory layout, and this will cause invalid memory access if the standard library changes the implementation. No warnings or errors will be emitted once the change happens.

References

  • github.com/advisories/GHSA-fhv4-fx3v-77w6
  • github.com/quinn-rs/quinn
  • github.com/quinn-rs/quinn/issues/968
  • nvd.nist.gov/vuln/detail/CVE-2021-28036
  • rustsec.org/advisories/RUSTSEC-2021-0035.html

Code Behaviors & Features

Detect and mitigate CVE-2021-28036 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.5.4, all versions starting from 0.6.0 before 0.6.2

Fixed versions

  • 0.5.4
  • 0.6.2

Solution

Upgrade to versions 0.5.4, 0.6.2 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer

Source file

cargo/quinn/CVE-2021-28036.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:55 +0000.