GHSA-h5j3-crg5-8jqm
JSON

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 packageVersionsReported by
orx-pinned-vec (crates.io)before 3.21.0, from 0.0.0-0 before 3.21.0GitHub Advisory Database, RustSec Advisory Database

Classification

References

Sources

SourceRecordLicence
GitHub Advisory DatabaseGHSA-h5j3-crg5-8jqm changed 2025-10-28CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2025-0106 changed 2025-10-28CC0-1.0