Email me

Rust advisories / vku

UnsoundRUSTSEC-2025-0162 · vku

RUSTSEC-2025-0162: `VMABuffer::set_data` may allow out-of-bounds writes from safe code

Short answervku has an API that can cause undefined behaviour from safe code: `VMABuffer::set_data` may allow out-of-bounds writes from safe code. Fixed in 0.4.0.

Cratevku
TypeUnsound (memory-corruption)
Affected versionsBefore 0.4.0.
Fixed in0.4.0
Severitynot scored
Published2025-04-23
Last changed2026-05-20
Also known asnone
Affected functionsvku::VMABuffer::set_data

What to do

  1. See which version you have: cargo tree -i vku (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p vku. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example vku = "0.4.0") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

VMABuffer::set_data was a publicly accessible safe function. It accepted an arbitrary offset and a data slice, then used the offset in unsafe pointer arithmetic before copying the slice into a mapped allocation.

Affected versions did not check that the requested write range fit within the allocation before calling ptr.add(offset) and copy_from_nonoverlapping. Safe Rust code could therefore trigger an out-of-bounds write by passing an offset outside the mapped allocation.

This makes the safe API unsound, since callers can trigger undefined behavior without using unsafe.

Version 0.4.0 added a bounds check before performing the pointer arithmetic and copy.

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.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.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