Advisory

RUSTSEC-2025-0106

Also known as: GHSA-h5j3-crg5-8jqm

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.

Severity

Not rated by the source.

Dates

Published
2025-10-21 12:00 UTC
Modified
2025-10-28 06:29 UTC

Affected packages and fixes

orx-pinned-vec

crates.io · All systems

Affected

  • introduced 0.0.0-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: RustSec Advisory Database · CC0-1.0

Sources & licences