GHSA-7v4j-8wvr-v55r

Suggest an improvement
Source
https://github.com/advisories/GHSA-7v4j-8wvr-v55r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-7v4j-8wvr-v55r/GHSA-7v4j-8wvr-v55r.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-7v4j-8wvr-v55r
Aliases
Published
2022-06-16T23:40:38Z
Modified
2023-11-08T04:17:00.535399Z
Summary
`array!` macro is unsound when its length is impure constant
Details

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 by making sure that array length is substituted just once.

Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2022-06-16T23:40:38Z"
}
References

Affected packages

crates.io / array-macro

Package

Affected ranges

Type
SEMVER
Events
Introduced
2.1.0
Fixed
2.1.2