Memory Safety Vulnerability in Rust Programming Language Standard Library
Summary
CVE-2019-12083: The Rust Programming Language Standard Library 1.34.x before 1.34.2 contains a stabilized method which, if overridden, can violate Rust's safety guarantees and cause memory unsafety. Affects rust across 2 version ranges.
< 1.34.2-r0
>= 91856ed52c58aa5ba66a015354d1cc69e9779bdf, < 6c2484dc3c532c052f159264e970278d8b77cdc9
Fixed in 1.34.2-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Rust Programming Language Standard Library is a core component of the Rust programming language. It provides a set of common tools and functionality for Rust developers. The library is widely used in various applications and frameworks. However, versions 1.34.x before 1.34.2 of the library contain a memory safety vulnerability that can be exploited if the Error::type_id method is overridden. This can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities in safe code.
Vulnerability Detail
The vulnerability (CVE-2019-12083) arises from a stabilized method in the Rust Programming Language Standard Library. If the Error::type_id method is overridden, it allows any type to be safely cast to any other type, violating Rust's safety guarantees. This can result in memory safety vulnerabilities, such as out-of-bounds write or read. It is important to note that code that does not manually implement Error::type_id is unaffected by this vulnerability.
How To Fix
Minimum fixed version
1.34.2-r0
This is the first release that contains the fix.
sudo apk add --upgrade rust
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, updating the library to the fixed version is the recommended solution.
Conclusion
The memory safety vulnerability in the Rust Programming Language Standard Library (CVE-2019-12083) can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities. It is crucial to update the library to version 1.34.2 or later to mitigate this issue. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for rust →
FAQ
The vulnerability can lead to memory unsafety and potential out-of-bounds write or read vulnerabilities in safe code.
Versions 1.34.x before 1.34.2 are affected by this vulnerability.
No, code that does not manually implement Error::type_id is unaffected by this vulnerability.
To fix this vulnerability, update the Rust Programming Language Standard Library to version 1.34.2 or later.
There are no specific workarounds mentioned for this vulnerability. Updating the library to the fixed version is the recommended solution.
References
Related vulnerabilities
Recent vulnerabilities recorded for rust.