Vulnerability DatabaseRUSTSEC-2025-0106

RUSTSEC-2025-0106
Rust vulnerability analysis and mitigation

Overview

RUSTSEC-2025-0106 is a potential undefined behavior vulnerability in the index_of_ptr function of the orx-pinned-vec crate. The issue was discovered and reported on October 1, 2025, affecting version 3.10.0 and earlier versions of the crate. The vulnerability occurs when the function is called with an empty slice, causing an underflow in pointer arithmetic (GitHub Issue).

Technical details

The vulnerability exists in the index_of_ptr function within orx-pinned-vec/src/utils/slice.rs. When called with an empty slice, the line ptr.add(slice.len() - 1) causes an underflow since slice.len() is 0. According to Rust's safety rules, creating a pointer with such a massive offset results in undefined behavior. This violates the core guarantee that a safe function cannot cause UB on any input, as confirmed through Miri testing (GitHub Issue).

Impact

The vulnerability can lead to undefined behavior in programs using the affected function with empty slices. Since this is a safe function that can trigger undefined behavior, it represents a serious soundness hole in the Rust type system's safety guarantees (GitHub Issue).

Mitigation and workarounds

A suggested fix is to add a check at the beginning of the function: if slice.is_empty() { return None; } to handle empty slices before performing pointer arithmetic (GitHub Issue).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-62518HIGH8.1
  • RustRust
  • rust-astral-tokio-tar
NoYesOct 21, 2025
GHSA-fp5x-7m4q-449fLOW2
  • RustRust
  • direct_ring_buffer
NoYesOct 21, 2025
GHSA-h5j3-crg5-8jqmLOW2
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 2025
RUSTSEC-2025-0107N/AN/A
  • RustRust
  • borrowck_sacrifices
NoYesOct 21, 2025
RUSTSEC-2025-0106N/AN/A
  • RustRust
  • orx-pinned-vec
NoYesOct 21, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management