RUSTSEC-2025-0106
Dashboard / Vulnerabilities / RUSTSEC-2025-0106
Summary: Undefined behavior in index_of_ptr with empty slices
Details: The safe function `index_of_ptr` causes undefined behavior when called with an empty slice. The 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.
References: https://crates.io/crates/orx-pinned-vec, https://rustsec.org/advisories/RUSTSEC-2025-0106.html, https://github.com/orxfun/orx-pinned-vec/issues/52, https://github.com/orxfun/orx-pinned-vec/pull/53
Affected packages
Package
Name: orx-pinned-vec
Purl: pkg:cargo/orx-pinned-vec
Affected ranges
Type: SEMVER
Events:
Introduced- 0.0.0-0
Fixed -3.21.0
Affected versions
Common Vulnerability Scoring System
Attack Vector
Network
Adjacent
Local
Physical
Privileges Required
None
Low
High
User Interaction
None
Required
Scope
Unchanged
Changed
Confidentiality
None
Low
High
Integrity
None
Low
High
Availability
None
Low
High
