{"id":"RUSTSEC-2026-0186","aliases":[],"status":"published","title":"Unchecked pointer offset in crate `memmap2`","description":"Affected versionf of `memmap2` did not perform enough validation on the `offset` and `len` parameters of\n`Mmap::[unchecked_]advise_range()`,\n`MmapMut::[unchecked_]advise_ranage()`\nand `MmapMut::flush[_async]_range()`.\n\nThis can cause undefined behavior due to invalid values being passed to [`pointer::offset()`] and [`pointer::add()`]\nwhen passing an out-of-bounds range to any of the affected functions.\n\nThe flaw was corrected in commit [`cee7cf0`] and released in version `0.9.11`.\n\nThe invalid pointer is not dereferenced,\nbut it is passed to the `madvise` and `msync` syscalls and their Windows equivalents.\n\n[`pointer::offset()`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset-1\n[`pointer::add()`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.add-1\n[`cee7cf0`] https://github.com/RazrFalcon/memmap2-rs/pull/170/changes/cee7cf03a9ee095982a3c37b7aac8e3f68f1a00c","facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"published":"2026-06-20T12:00:00Z","modified":"2026-06-22T18:15:03Z","fixes":[{"ecosystem":"crates.io","package":"memmap2","fixed_in":["0.9.11"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"crates.io","package":"memmap2","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.9.11"}]}]}],"references":[{"url":"https://crates.io/crates/memmap2","tags":["package"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0186.html","tags":["advisory"]},{"url":"https://github.com/RazrFalcon/memmap2-rs/issues/169","tags":["report"]},{"url":"https://github.com/RazrFalcon/memmap2-rs/pull/170","tags":["web"]}],"sources":{"osv":[{"id":"RUSTSEC-2026-0186","title":"Unchecked pointer offset in crate `memmap2`","description":"Affected versionf of `memmap2` did not perform enough validation on the `offset` and `len` parameters of\n`Mmap::[unchecked_]advise_range()`,\n`MmapMut::[unchecked_]advise_ranage()`\nand `MmapMut::flush[_async]_range()`.\n\nThis can cause undefined behavior due to invalid values being passed to [`pointer::offset()`] and [`pointer::add()`]\nwhen passing an out-of-bounds range to any of the affected functions.\n\nThe flaw was corrected in commit [`cee7cf0`] and released in version `0.9.11`.\n\nThe invalid pointer is not dereferenced,\nbut it is passed to the `madvise` and `msync` syscalls and their Windows equivalents.\n\n[`pointer::offset()`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset-1\n[`pointer::add()`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.add-1\n[`cee7cf0`] https://github.com/RazrFalcon/memmap2-rs/pull/170/changes/cee7cf03a9ee095982a3c37b7aac8e3f68f1a00c","status":"published","published":"2026-06-20T12:00:00Z","modified":"2026-06-22T18:15:03.600280397Z","updated_at":"2026-11-02T15:53:40.430679Z"}]}}
