# GHSA-xqjr-wfx3-gmxv: ArrayQueue's push_front is not panic-safe

- Severity: Medium (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-08-14T12:00:00.000Z
- Modified: 2025-10-28T06:29:27.045Z
- Also known as: RUSTSEC-2025-0054
- Weaknesses: CWE-665

## Description

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

(As written by GitHub Advisory Database.)

## Affected

- array-queue (crates.io): from 0.3.0 before 0.4.0

## References

- <https://github.com/raviqqe/array-queue/issues/3> (report, web)
- <https://github.com/raviqqe/array-queue/commit/728fe1bdffb04896d218e962d989a2ae6bf1ea92> (web)
- <https://github.com/raviqqe/array-queue> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0054.html> (advisory, web)
- <https://crates.io/crates/array-queue> (package)

## Sources

- GitHub Advisory Database: [GHSA-xqjr-wfx3-gmxv](https://github.com/advisories/GHSA-xqjr-wfx3-gmxv), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2025-0054](https://rustsec.org/advisories/RUSTSEC-2025-0054.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-xqjr-wfx3-gmxv · Whole record: https://cve.day/GHSA-xqjr-wfx3-gmxv.json · Rebuilt by cve.day 2026-11-25T22:56:43.263Z
