Security
Headlines
HeadlinesLatestCVEs

Headline

GHSA-7v4j-8wvr-v55r: `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 by making sure that array length is substituted just once.

ghsa
#vulnerability#mac#git
  1. GitHub Advisory Database
  2. GitHub Reviewed
  3. GHSA-7v4j-8wvr-v55r

`array!` macro is unsound when its length is impure constant

Moderate severity GitHub Reviewed Published Jun 16, 2022 • Updated Jun 16, 2022

Vulnerability details Dependabot alerts 0

Package

cargo array-macro (Rust)

Affected versions

< 2.1.2

Patched versions

2.1.2

Description

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.

References

  • https://github.com/rustsec/advisory-db/blob/main/crates/array-macro/RUSTSEC-2022-0017.md
  • https://gitlab.com/KonradBorowski/array-macro/-/issues/5
  • https://rustsec.org/advisories/RUSTSEC-2022-0017.html

Severity

Moderate

Weaknesses

No CWEs

CVE ID

No known CVE

GHSA ID

GHSA-7v4j-8wvr-v55r

Source code

https://gitlab.com/KonradBorowski/array-macro

See something to contribute? Suggest improvements for this vulnerability.

ghsa: Latest News

GHSA-27wf-5967-98gx: Kubernetes kubelet arbitrary command execution