GHSA-7v4j-8wvr-v55r – array-macro
Package
Manager: cargo
Name: array-macro
Vulnerable Version: >=2.1.0 <2.1.2
Severity
Level: Medium
CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N/E:P/RL:O/RC:R
CVSS v4.0: CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
`array!` macro is unsound when its length is impure constant Affected versions of this crate did substitute the array length provided by an user at compile-time multiple times. When an impure constant expression is passed as an array length (such as a result of an impure procedural macro), this can result in the initialization of an array with uninitialized types, which in turn can allow an attacker to execute arbitrary code. The flaw was corrected in commit [d5b63f72](https://github.com/xfix/array-macro/commit/d5b63f72090f3809c21ac28f9cfd84f12559bf7d) by making sure that array length is substituted just once.
Metadata
Created: 2022-06-16T23:40:38Z
Modified: 2022-06-20T18:24:00Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-7v4j-8wvr-v55r/GHSA-7v4j-8wvr-v55r.json
CWE IDs: []
Alternative ID: N/A
Finding: F138
Auto approve: 1