GHSA-h5j3-crg5-8jqm
low
orx-pinned-vec has undefined behavior in index_of_ptr with empty slices
- Severity
- low CVSS:4.0 by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2025-0106
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| orx-pinned-vec (crates.io) | before 3.21.0, from 0.0.0-0 before 3.21.0 | GitHub Advisory Database, RustSec Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-h5j3-crg5-8jqm changed 2025-10-28 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2025-0106 changed 2025-10-28 | CC0-1.0 |