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.
| Crate | vku |
|---|---|
| Type | Unsound (memory-corruption) |
| Affected versions | Before 0.4.0. |
| Fixed in | 0.4.0 |
| Severity | not scored |
| Published | 2025-04-23 |
| Last changed | 2026-05-20 |
| Also known as | none |
| Affected functions | vku::VMABuffer::set_data |
What to do
- See which version you have:
cargo tree -i vku(it also shows which of your dependencies pulls it in). - 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 examplevku = "0.4.0") or update the dependency that pulls it in. - 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
- Package: crates.io/crates/vku
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0162.html
- Report: github.com/ArrowMaxGithub/vku/issues/5
- Web: github.com/ArrowMaxGithub/vku/commit/ce02c19ec35e5ee84c00ec5005be9d6d44599b5f
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 →Also worth your time
Did this answer your question?