CVE-2020-36318

In the standard library in Rust before 1.49.0, VecDeque::make_contiguous has a bug that pops the same element more than once under certain condition

published April 11, 2021

CVSS
—
EPSS
2%
Percentile
76.7
In the wild
Unconfirmed
What it is

⚠️ A pesky bug in Rust's VecDeque::make_contiguous could pop the same element more than once! It's like a sandwich shop that accidentally keeps serving up the same slice of tomato. 🍅 Imagine ordering a sandwich but the shop accidentally gives you the same slice of tomato every time. That's how this bug can mishandle elements in memory, leading to some undesirable situations! An attacker could exploit this bug to trigger a use-after-free or double-free error, potentially causing unpredictable behavior in your program. This could lead to crashes or even a chance for an attacker to execute malicious code, which is definitely not what you want!

Put simply

Imagine ordering a sandwich but the shop accidentally gives you the same slice of tomato every time. That's how this bug can mishandle elements in memory, leading to some undesirable situations! This vulnerability in Rust's standard library allows VecDeque::make_contiguous to improperly manage memory, resulting in the same element being popped multiple times, leading to use-after-free and double-free scenarios.

What to do

An attacker could exploit this bug to trigger a use-after-free or double-free error, potentially causing unpredictable behavior in your program. This could lead to crashes or even a chance for an attacker to execute malicious code, which is definitely not what you want! Ensure you're running Rust version 1.49.0 or later to avoid this bug. If you're using an older version, make an update part of your next maintenance routine to keep things secure! You’ve got this! Keep your Rust code safe and sound with a quick update! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.01676 · 76.7th percentile
Published
2021-04-11T19:05Z
EPSS history
Timeline
  • 11 APR 19:05Z
    In the standard library in Rust before 1.49.0, VecDeque::make_contiguous has a bug that pops the same element more than once under certain condition
    cvelistv5