{"id":"GHSA-h5j3-crg5-8jqm","aliases":["RUSTSEC-2025-0106"],"status":"published","title":"orx-pinned-vec has undefined behavior in index_of_ptr with empty slices","description":"The safe function `index_of_ptr` causes undefined behavior when called with an empty slice.\n\nThe issue occurs in the line `ptr.add(slice.len() - 1)` which underflows when `slice.len()` is 0, creating a pointer with a massive offset. According to Rust's safety rules, creating such a pointer causes immediate undefined behavior.","severity":{"version":"4.0","score":2,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119","CWE-191"],"published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:24Z","fixes":[{"ecosystem":"crates.io","package":"orx-pinned-vec","fixed_in":["3.21.0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"orx-pinned-vec","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.21.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"orx-pinned-vec","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.21.0"}]}]},{"source":"osv","ecosystem":"crates.io","package":"orx-pinned-vec","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"3.21.0"}]}]}],"references":[{"url":"https://github.com/orxfun/orx-pinned-vec/issues/52","tags":["web","report"]},{"url":"https://github.com/orxfun/orx-pinned-vec/pull/53","tags":["web"]},{"url":"https://github.com/orxfun/orx-pinned-vec/commit/4a4007a1aaff25cd417853c76163883a7110e276","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0106.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-h5j3-crg5-8jqm"},{"url":"https://github.com/orxfun/orx-pinned-vec","tags":["package"]},{"url":"https://crates.io/crates/orx-pinned-vec","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-h5j3-crg5-8jqm","title":"orx-pinned-vec has undefined behavior in index_of_ptr with empty slices","description":"The safe function `index_of_ptr` causes undefined behavior when called with an empty slice.\n\nThe issue occurs in the line `ptr.add(slice.len() - 1)` which underflows when `slice.len()` is 0, creating a pointer with a massive offset. According to Rust's safety rules, creating such a pointer causes immediate undefined behavior.","status":"published","published":"2025-10-21T21:54:27Z","modified":"2025-10-21T21:54:28Z","cvss":[{"version":"4.0","score":2,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","level":"low"}],"cwes":["CWE-119","CWE-191"],"updated_at":"2026-11-02T14:39:02.474737Z"}],"osv":[{"id":"GHSA-h5j3-crg5-8jqm","title":"orx-pinned-vec has undefined behavior in index_of_ptr with empty slices","description":"The safe function `index_of_ptr` causes undefined behavior when called with an empty slice.\n\nThe issue occurs in the line `ptr.add(slice.len() - 1)` which underflows when `slice.len()` is 0, creating a pointer with a massive offset. According to Rust's safety rules, creating such a pointer causes immediate undefined behavior.","status":"published","published":"2025-10-21T21:54:27Z","modified":"2025-10-28T06:29:24.973717Z","cvss":[{"version":"4.0","score":2,"vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P","level":"low"}],"cwes":["CWE-119","CWE-191"],"updated_at":"2026-11-02T15:46:48.546324Z"},{"id":"RUSTSEC-2025-0106","title":"Undefined behavior in index_of_ptr with empty slices","description":"The safe function `index_of_ptr` causes undefined behavior when called with an empty slice.\n\nThe issue occurs in the line `ptr.add(slice.len() - 1)` which underflows when `slice.len()` is 0, creating a pointer with a massive offset. According to Rust's safety rules, creating such a pointer causes immediate undefined behavior.","status":"published","published":"2025-10-21T12:00:00Z","modified":"2025-10-28T06:29:24.973717Z","updated_at":"2026-11-02T15:53:39.971022Z"}]}}
