Access of Resource Using Incompatible Type ('Type Confusion') Affecting zerocopy package, versions >=0.2.2 <0.2.9>=0.3.0 <0.3.2>=0.4.0 <0.4.1>=0.5.0 <0.5.2>=0.6.0 <0.6.6>=0.7.0 <0.7.31


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Access of Resource Using Incompatible Type ('Type Confusion') vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-ZEROCOPY-6131647
  • published19 Dec 2023
  • disclosed18 Dec 2023
  • creditUnknown

Introduced: 18 Dec 2023

CVE NOT AVAILABLE CWE-843  (opens in a new tab)

How to fix?

Upgrade zerocopy to version 0.2.9, 0.3.2, 0.4.1, 0.5.2, 0.6.6, 0.7.31 or higher.

Overview

Affected versions of this package are vulnerable to Access of Resource Using Incompatible Type ('Type Confusion') via the Ref methods into_ref, into_mut, into_slice, and into_slice_mut. An attacker can induce undefined behavior by using these methods with Ref<B, T> where B is cell::Ref or cell::RefMut.

Note: This issue does not affect B types other than cell::Ref or cell::RefMut.

CVSS Scores

version 3.1