GHSA-h5j3-crg5-8jqm json
orx-pinned-vec has undefined behavior in index_of_ptr with empty slices
published last yr. modified last yr. also RUSTSEC-2025-0106
- cvss
- —
- not scored
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io orx-pinned-vec 3.21.0
- github.com/orxfun/orx-pinned-vec@4a4007a commit
- github.com/orxfun/orx-pinned-vec#53 pull request
Is GHSA-h5j3-crg5-8jqm in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerAffected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | orx-pinned-vec | <3.21.0 >=0.0.0-0, <3.21.0 |
3.21.0 |
Classification
References
-
github.com
/orxfun/orx-pinned-vec/pull/53
web
-
github.com
/orxfun/orx-pinned-vec/commit/4a4007a1aaff25cd417853c76163883a7110e276
web
-
github.com
/orxfun/orx-pinned-vec/issues/52
web, report
-
github.com
/orxfun/orx-pinned-vec
package
-
rustsec.org
/advisories/RUSTSEC-2025-0106.html
web, advisory
-
crates.io
/crates/orx-pinned-vec
package
Sources
- GitHub Advisory GHSA-h5j3-crg5-8jqm
- OSV RUSTSEC-2025-0106
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.