CVE-2021-3420 Integer overflow in newlib

Critical 9.8 Published Updated

An integer overflow in newlib memory allocation functions can lead to heap-based buffer overflows, potentially allowing arbitrary code execution.

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-3420?

CVE-2021-3420 is a critical vulnerability in Fedoraproject Fedora, published on 5 Mar 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in newlib in versions prior to 4.0.0. Improper overflow validation in the memory allocation functions mEMALIGn, pvALLOc, nano_memalign, nano_valloc, nano_pvalloc could case an integer overflow, leading to an allocation of a small buffer and then to a heap-based buffer overflow.

Weakness: CWE-190

Which versions are affected by CVE-2021-3420?

It affects 2 products.

Linux distribution packages (1)
newlib openSUSE:TumbleweedAll versions4.1.0-2.2

Products include Fedoraproject Fedora, Newlib Project Newlib.

How do I fix CVE-2021-3420?

Upgrade to a fixed version.

Is CVE-2021-3420 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-3420, GHSA-wp32-4vw5-mw9c, UBUNTU-CVE-2021-3420, openSUSE-SU-2024:11086-1.

Is CVE-2021-3420 in your software?

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

Check your SBOMs for free