{"id":"RUSTSEC-2025-0162","aliases":["RUSTSEC-2025-0162"],"related":[],"kind":"vulnerability","state":"published","title":"`VMABuffer::set_data` may allow out-of-bounds writes from safe code","summary":"`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.\n\nAffected 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.\n\nThis makes the safe API unsound, since callers can trigger undefined behavior without using `unsafe`.\n\nVersion `0.4.0` added a bounds check before performing the pointer arithmetic and copy.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"`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.\n\nAffected 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.\n\nThis makes the safe API unsound, since callers can trigger undefined behavior without using `unsafe`.\n\nVersion `0.4.0` added a bounds check before performing the pointer arithmetic and copy.","format":"markdown","source":"rustsec"}],"published":"2025-04-23T12:00:00.000Z","modified":"2026-05-20T13:45:04.461Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.4.0"}],"ecosystem":"crates.io","package":"vku","purl":"pkg:cargo/vku","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/vku","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0162.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/ArrowMaxGithub/vku/issues/5","tags":["report"],"sources":["rustsec"]},{"url":"https://github.com/ArrowMaxGithub/vku/commit/ce02c19ec35e5ee84c00ec5005be9d6d44599b5f","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0162","url":"https://rustsec.org/advisories/RUSTSEC-2025-0162.html","licence":"CC0-1.0","modified":"2026-05-20T13:45:04.461Z"}],"updatedAt":"2026-11-25T22:56:43.294Z"}