Type Confusion Affecting eyre package, versions >=0.6.9 <0.6.12


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept

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 Type Confusion vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUST-EYRE-6579642
  • published7 Apr 2024
  • disclosed5 Apr 2024
  • creditstevepryde

Introduced: 5 Apr 2024

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

How to fix?

Upgrade eyre to version 0.6.12 or higher.

Overview

Affected versions of this package are vulnerable to Type Confusion due to the incorrect handling of types during the downcast process. Specifically, when a Report is constructed using wrap_err or wrap_err_with to attach a message of one type onto an error of another type, and then downcast is used to recover ownership of either value, incorrect drop behavior may occur. This can lead to memory corruption if the Report contains an error with nontrivial drop behavior. Additionally, if the error has trivial drop behavior but the attached message does not, downcasting may result in a memory leak.

CVSS Scores

version 3.1