{"id":"RUSTSEC-2026-0127","aliases":["RUSTSEC-2026-0127"],"related":[],"kind":"vulnerability","state":"published","title":"Integer overflow in `array::ReadWrite::new()` leading to potential memory corruption","summary":"In `array::ReadWrite::new()` (line 83 of `accessor/src/array.rs`),\n`let bytes = mem::size_of::<T>() * len` can overflow `usize` when `len` is\nvery large. In release mode, this silently wraps, potentially making\n`bytes = 0`. The mapper then maps with 0 bytes, and subsequent accesses\n(e.g. `read_volatile_at`) lead to undefined behavior or memory corruption.\n\nNote: `array::ReadWrite::new()` itself is `unsafe`, so direct triggering\nrequires an `unsafe` block. However, the integer overflow violates the\nimplicit safety contract expected by callers and can lead to memory\ncorruption downstream.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"In `array::ReadWrite::new()` (line 83 of `accessor/src/array.rs`),\n`let bytes = mem::size_of::<T>() * len` can overflow `usize` when `len` is\nvery large. In release mode, this silently wraps, potentially making\n`bytes = 0`. The mapper then maps with 0 bytes, and subsequent accesses\n(e.g. `read_volatile_at`) lead to undefined behavior or memory corruption.\n\nNote: `array::ReadWrite::new()` itself is `unsafe`, so direct triggering\nrequires an `unsafe` block. However, the integer overflow violates the\nimplicit safety contract expected by callers and can lead to memory\ncorruption downstream.","format":"markdown","source":"rustsec"}],"published":"2026-05-02T12:00:00.000Z","modified":"2026-05-13T12:30:54.055Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"accessor","purl":"pkg:cargo/accessor","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/accessor","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0127.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/toku-sa-n/accessor/issues/49","tags":["report"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0127","url":"https://rustsec.org/advisories/RUSTSEC-2026-0127.html","licence":"CC0-1.0","modified":"2026-05-13T12:30:54.055Z"}],"updatedAt":"2026-11-25T22:56:43.349Z"}