GHSA-h5j3-crg5-8jqm

Suggest an improvement
Source
https://github.com/advisories/GHSA-h5j3-crg5-8jqm
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/10/GHSA-h5j3-crg5-8jqm/GHSA-h5j3-crg5-8jqm.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-h5j3-crg5-8jqm
Published
2025-10-21T21:54:27Z
Modified
2025-10-21T21:54:27Z
Severity
  • 2.0 (Low) CVSS_V4 - 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 CVSS Calculator
Summary
orx-pinned-vec has 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.

Database specific
{
    "nvd_published_at": null,
    "severity": "LOW",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-119",
        "CWE-191"
    ],
    "github_reviewed_at": "2025-10-21T21:54:27Z"
}
References

Affected packages

crates.io / orx-pinned-vec

Package

Name
orx-pinned-vec
View open source insights on deps.dev
Purl
pkg:cargo/orx-pinned-vec

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.21.0