{"id":"RUSTSEC-2026-0127","aliases":[],"status":"published","title":"Integer overflow in `array::ReadWrite::new()` leading to potential memory corruption","description":"In `array::ReadWrite::new()` (line 83 of `accessor/src/array.rs`),\n`let bytes = mem::size_of::\u003cT\u003e() * 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.","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"published":"2026-05-02T12:00:00Z","modified":"2026-05-13T12:30:54Z","affected":[{"source":"osv","ecosystem":"crates.io","package":"accessor","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"}]}]}],"references":[{"url":"https://crates.io/crates/accessor","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0127.html","tags":["advisory"]},{"url":"https://github.com/toku-sa-n/accessor/issues/49","tags":["report"]}],"sources":{"osv":[{"id":"RUSTSEC-2026-0127","title":"Integer overflow in `array::ReadWrite::new()` leading to potential memory corruption","description":"In `array::ReadWrite::new()` (line 83 of `accessor/src/array.rs`),\n`let bytes = mem::size_of::\u003cT\u003e() * 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.","status":"published","published":"2026-05-02T12:00:00Z","modified":"2026-05-13T12:30:54.05527Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
