# RUSTSEC-2026-0581: `Deque::make_contiguous` could lead to broken invariants

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-11-18T12:00:00.000Z
- Modified: 2026-11-19T09:00:03.911Z

## Description

In some branches, `Deque::make_contiguous` set the `back` value to either `0` or `N` when it shouldn't, leading to broken invariants and out-of-bounds writes.

Reported by [DRMacIver](https://github.com/DRMacIver) and [https://github.com/MJUCOM](https://github.com/MJUCOM).

(As written by RustSec Advisory Database.)

## Affected

- heapless (crates.io): from 0.0.0-0 before 0.9.4

## References

- <https://crates.io/crates/heapless> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0581.html> (advisory)
- <https://github.com/rust-embedded/heapless/issues/694> (report)
- <https://github.com/rust-embedded/heapless/issues/676> (report)

## Sources

- RustSec Advisory Database: [RUSTSEC-2026-0581](https://rustsec.org/advisories/RUSTSEC-2026-0581.html), CC0-1.0, modified 2026-11-19

---

Page: https://cve.day/RUSTSEC-2026-0581 · Whole record: https://cve.day/RUSTSEC-2026-0581.json · Rebuilt by cve.day 2026-11-25T22:56:43.520Z
