{"id":"RUSTSEC-2025-0162","aliases":[],"status":"published","title":"`VMABuffer::set_data` may allow out-of-bounds writes from safe code","description":"`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.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2025-04-23T12:00:00Z","modified":"2026-05-20T13:45:04Z","fixes":[{"ecosystem":"crates.io","package":"vku","fixed_in":["0.4.0"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"crates.io","package":"vku","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.4.0"}]}]}],"references":[{"url":"https://crates.io/crates/vku","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0162.html","tags":["advisory"]},{"url":"https://github.com/ArrowMaxGithub/vku/issues/5","tags":["report"]},{"url":"https://github.com/ArrowMaxGithub/vku/commit/ce02c19ec35e5ee84c00ec5005be9d6d44599b5f","tags":["web"]}],"sources":{"osv":[{"id":"RUSTSEC-2025-0162","title":"`VMABuffer::set_data` may allow out-of-bounds writes from safe code","description":"`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.","status":"published","published":"2025-04-23T12:00:00Z","modified":"2026-05-20T13:45:04.461804188Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
