CVE-2021-28031

An issue was discovered in the scratchpad crate before 1.3.1 for Rust

published March 5, 2021

CVSS
—
EPSS
1%
Percentile
71.6
In the wild
Unconfirmed
What it is

⚠️ A double-free could happen during a panic — and this one hides in the scratchpad crate! It’s like a recipe that accidentally asks you to use the same ingredient twice. 🍽️ Picture a busy chef juggling two orders. If they accidentally try to serve the same dish twice, it can lead to chaos in the kitchen! Similarly, if the move_elements function in scratchpad panics, it can free the same memory space twice, creating a recipe for disaster. In this case, a double-free can result in undefined behavior, which could lead to crashes or even potential exploits. While this isn't marked as actively exploited, it could leave your application vulnerable to unexpected interruptions or errors, which could be incredibly disruptive!

Put simply

Picture a busy chef juggling two orders. If they accidentally try to serve the same dish twice, it can lead to chaos in the kitchen! Similarly, if the move_elements function in scratchpad panics, it can free the same memory space twice, creating a recipe for disaster. This vulnerability occurs in the scratchpad crate before version 1.3.1 for Rust, where a panic in a user-defined function can trigger a double-free in the move_elements function, leading to potential memory corruption.

What to do

In this case, a double-free can result in undefined behavior, which could lead to crashes or even potential exploits. While this isn't marked as actively exploited, it could leave your application vulnerable to unexpected interruptions or errors, which could be incredibly disruptive! To mitigate this issue, update the scratchpad crate to version 1.3.1 or later. Review your code to ensure that user-defined functions handle panics appropriately, reducing the risk of similar issues in the future. You've got this! With a quick update, you'll have your Rust applications running smoothly and securely! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01364 · 71.6th percentile
Published
2021-03-05T08:40Z
EPSS history
Timeline
  • 05 MAR 08:40Z
    An issue was discovered in the scratchpad crate before 1.3.1 for Rust
    cvelistv5