Security mailing lists by PureSourceCode

GHSA-7v4j-8wvr-v55r

MEDIUM

`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.

Published
27 Apr 2022
Last modified
8 Nov 2023
Also known as
RUSTSEC-2022-0017
Sources
OSVJSONOSV RUSTSEC-2022-0017JSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io array-macro >= 2.1.0, < 2.1.2 2.1.2

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 27 Apr 2022)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 16 Jun 2022)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.