Security mailing lists by PureSourceCode

RUSTSEC-2025-0054

MEDIUM

ArrayQueue's push_front is not panic-safe

The safe API array_queue::ArrayQueue::push_front can lead to deallocating uninitialized memory if a panic occurs while invoking the clone method on the passed argument.

Specifically, push_front receives an argument that is intended to be cloned and pushed, whose type implements the Clone trait. Furthermore, the method updates the queue's start index before initializing the slot for the newly pushed element. User-defined implementations of Clone may include a clone method that can panic. If such a panic occurs during initialization, the structure is left with an advanced start index pointing to an uninitialized slot. When ArrayQueue is later dropped, its destructor treats that slot as initialized and attempts to drop it, resulting in an attempt to free uninitialized memory.

The bug was fixed in commit 728fe1b.

Published
14 Aug 2025
Last modified
28 Oct 2025
Weakness
CWE-665
Also known as
GHSA-xqjr-wfx3-gmxv
Sources
OSV GHSA-xqjr-wfx3-gmxvJSONOSVJSON

Scores

SourceScored byVersionScoreVector / decision
OSV GitHub CVSS 4.0 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV crates.io array-queue >= 0.3.0, < 0.4.0 0.4.0

References

History

  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 14 Aug 2025)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Sep 2025)
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.