Advisory

GHSA-h5j3-crg5-8jqm

Also known as: RUSTSEC-2025-0106

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.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2025-10-21 21:54 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

orx-pinned-vec

crates.io · All systems

Affected

  • introduced 0, fixed 3.21.0 (semver)

Fixed versions

3.21.0

Fix

  • Fixed version 3.21.0
    cargo update -p orx-pinned-vec --precise 3.21.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences