RUSTSEC-2025-0106

Source
https://rustsec.org/advisories/RUSTSEC-2025-0106
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2025-0106.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2025-0106
Published
2025-10-21T12:00:00Z
Modified
2025-10-21T20:30:05Z
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.

Database specific
{
    "license": "CC0-1.0"
}
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
0.0.0-0
Fixed
3.21.0

Ecosystem specific

{
    "affects": {
        "arch": [],
        "os": [],
        "functions": [
            "orx_pinned_vec::utils::slice::index_of_ptr"
        ]
    },
    "affected_functions": null
}

Database specific

categories

[
    "memory-corruption"
]

informational

"unsound"

cvss

null