Critical Vulnerability in rust-sized-chunks Package: Array Size Check Bypass
Summary
DEBIAN-CVE-2020-25793: An issue was discovered in the sized-chunks crate through 0.6.2 for Rust. In the Chunk implementation, the array size is not checked when constructed with From. Affects rust-sized-chunks versions < 0.6.5-1. Fixed in 0.6.5-1. 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-sized-chunks package is a Rust crate designed for efficient handling of chunked data. It allows developers to work with arrays in a more manageable way, particularly when dealing with large datasets. However, this package has been found to have a critical vulnerability that affects its Chunk implementation, specifically related to the construction of arrays without proper size checks.
Vulnerability Detail
An issue was discovered in the sized-chunks crate through version 0.6.2 for Rust. The vulnerability lies in the Chunk implementation, where the array size is not validated when constructed using From<InlineArray<A, T>>. This oversight can lead to potential buffer overflows or memory corruption, allowing attackers to exploit the application that relies on this package, potentially leading to arbitrary code execution or application crashes.
How To Fix
Minimum fixed version
0.6.5-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade rust-sized-chunks
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary measure, developers can implement manual checks to validate the size of arrays before using them in their applications. This can be done by adding conditional statements to ensure that the array size does not exceed expected limits.
Conclusion
The rust-sized-chunks package has a critical vulnerability that can lead to severe security risks if not addressed. It is crucial for developers using this package to update to the patched version as soon as possible and to consider implementing additional checks in their code as a temporary workaround.
See every vulnerability recorded for rust-sized-chunks →
FAQ
The vulnerability can lead to buffer overflows or memory corruption, which may allow attackers to execute arbitrary code or crash the application.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your manifest file like package-lock.json to check for vulnerabilities.
Yes, the vulnerability has been patched in version 0.6.5-1 of the rust-sized-chunks package.
If an immediate update is not possible, implement manual size checks in your code to mitigate the risk until you can apply the patch.
You can find detailed information about this vulnerability in the Debian CVE database or by visiting the official repository of the rust-sized-chunks package.
References
Related vulnerabilities
Recent vulnerabilities recorded for rust-sized-chunks.