{"id":"GHSA-h5j3-crg5-8jqm","aliases":["GHSA-h5j3-crg5-8jqm","RUSTSEC-2025-0106"],"related":[],"kind":"vulnerability","state":"published","title":"orx-pinned-vec has undefined behavior in index_of_ptr with empty slices","summary":"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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2025-10-21T12:00:00.000Z","modified":"2025-10-28T06:29:24.973Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"LOW"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"LOW"}],"cwes":["CWE-119","CWE-191"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.21.0"}],"ecosystem":"crates.io","package":"orx-pinned-vec","purl":"pkg:cargo/orx-pinned-vec","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"3.21.0"}],"ecosystem":"crates.io","package":"orx-pinned-vec","purl":"pkg:cargo/orx-pinned-vec","source":"rustsec"}],"references":[{"url":"https://github.com/orxfun/orx-pinned-vec/issues/52","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/orxfun/orx-pinned-vec/pull/53","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/orxfun/orx-pinned-vec/commit/4a4007a1aaff25cd417853c76163883a7110e276","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/orxfun/orx-pinned-vec","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2025-0106.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/orx-pinned-vec","tags":["package"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-h5j3-crg5-8jqm","url":"https://github.com/advisories/GHSA-h5j3-crg5-8jqm","licence":"CC-BY-4.0","modified":"2025-10-28T06:29:24.973Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2025-0106","url":"https://rustsec.org/advisories/RUSTSEC-2025-0106.html","licence":"CC0-1.0","modified":"2025-10-28T06:29:24.973Z"}],"updatedAt":"2026-11-25T22:56:43.276Z"}