Email me

Rust advisories / crayon

Vulnerability HighRUSTSEC-2024-0018 · crayon

RUSTSEC-2024-0018: ObjectPool creates uninitialized memory when freeing objects

Short answerA security vulnerability in the crayon crate: ObjectPool creates uninitialized memory when freeing objects. GitHub rates it High. No fixed version: replace the crate or remove the affected code path.

Cratecrayon
TypeVulnerability (memory-corruption)
Affected versionsFrom 0.6.0 onward (every version).
Fixed innone
SeverityHigh (GitHub rating)
Published2024-02-27
Last changed2024-04-11
Also known asGHSA-xfhw-6mc4-mgxf
Affected functionscrayon::utils::object_pool::ObjectPool<H,T>::free

What to do

  1. Find who pulls it in: cargo tree -i crayon.
  2. Avoid the affected API (crayon::utils::object_pool::ObjectPool<H,T>::free), or replace the crate.

Details from the advisory

As of version 0.6.0, the ObjectPool explicitly creates an uninitialized instance of its type parameter when it attempts to free an object, and swaps it into the storage. This causes instant undefined behavior due to reading the uninitialized memory in order to write it to the pool storage.

Extremely basic usage of the crate can trigger this issue, e.g. this code from a doctest:

use crayon::prelude::*;
application::oneshot().unwrap();

let mut params = MeshParams::default();

let mesh = video::create_mesh(params, None).unwrap();

// Deletes the mesh object.
video::delete_mesh(mesh); // <-- UB

The Clippy warning for this code was silenced in commit c2fde19caf6149d91faa504263f0bc5cafc35de5.

Discovered via https://asan.saethlin.dev/ub?crate=crayon&version=0.7.1

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Other advisories for crayon

Full security history of crayon

Up next

Same cratecrayon: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ