RUSTSEC-2025-0162

Source
https://rustsec.org/advisories/RUSTSEC-2025-0162
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0162.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0162
Published
2025-04-23T12:00:00Z
Modified
2026-05-20T13:45:04.461804188Z
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / vku

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.4.0

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "functions": [
            "vku::VMABuffer::set_data"
        ],
        "arch": [],
        "os": []
    }
}

Database specific

categories
[
    "memory-corruption"
]
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0162.json"
informational
"unsound"
cvss
null