CVE-2021-27376 – nb-connect
Package
Manager: cargo
Name: nb-connect
Vulnerable Version: >=0 <1.0.3
Severity
Level: Critical
CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS: 0.00433 pctl0.6196
Details
nb-connect invalidly assumes the memory layout of std::net::SocketAddr The nb-connect 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.
Metadata
Created: 2021-08-25T20:52:14Z
Modified: 2023-06-13T18:30:56Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/08/GHSA-rm4w-6696-r77p/GHSA-rm4w-6696-r77p.json
CWE IDs: ["CWE-119"]
Alternative ID: GHSA-rm4w-6696-r77p
Finding: F316
Auto approve: 1