Advisory

RUSTSEC-2025-0162

Also known as: None

Summary

VMABuffer::set_data may allow out-of-bounds writes from safe code

Details

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.

Severity

Not rated by the source.

Dates

Published
2025-04-23 12:00 UTC
Modified
2026-05-20 13:45 UTC

Affected packages and fixes

vku

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.0 (semver)

Fixed versions

0.4.0

Fix

  • Fixed version 0.4.0
    cargo update -p vku --precise 0.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences