CVE-2021-28033 Deserializing an array can free uninitialized memory in byte_struct

Critical 9.8 Published Updated

A panic during deserialization in the byte_struct crate can cause a drop of uninitialized memory, potentially leading to crashes or undefined behavior.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-28033?

CVE-2021-28033 is a critical memory corruption vulnerability in n/a, published on 5 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

An issue was discovered in the byte_struct crate before 0.6.1 for Rust. There can be a drop of uninitialized memory if a certain deserialization method panics.

Weakness: CWE-908

Which versions are affected by CVE-2021-28033?

3 open source packages ship an affected version, including byte_struct. It affects 1 product.

PackageAffectedFixed in
byte_struct crates.ioAll versions0.6.1
byte_struct crates.ioAll versions0.6.1
byte_struct crates.ioFrom 0.0.0-00.6.1

Products include Byte Struct Project Byte Struct.

How do I fix CVE-2021-28033?

Upgrade byte_struct to 0.6.1 or later.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-28033 being exploited?

There is no known exploitation of CVE-2021-28033 in the wild and no public exploit code.

Sources

Also known as GHSA-8fgg-5v78-6g76, RUSTSEC-2021-0032.

Is CVE-2021-28033 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free