CVEfocus › CVE database › CVE-2021-3420

CVE-2021-3420

CVSS 9.8 CriticalEPSS 2.1% (higher than 82% of CVEs)Published 2021-03-05Updated 2024-08-03Assigner: redhat

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.

CWE-190

What to do

Fixed builds are available from Alpine, Debian: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

17Fixed
10Fix pending
6Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04gcc-snapshotNot affected
vulnerable_code_not_present
Ubuntu 26.04newlibNot affected
vulnerable_code_not_present
Ubuntu 25.10gcc-snapshotNot affected
vulnerable_code_not_present
Ubuntu 25.10newlibNot affected
vulnerable_code_not_present
Ubuntu 24.04gcc-snapshotNot affected
vulnerable_code_not_present
Ubuntu 24.04newlibFix pendingUBUNTU-CVE-2021-3420
Ubuntu 22.04gcc-snapshotNot affected
vulnerable_code_not_present
Ubuntu 22.04newlibFix pendingUBUNTU-CVE-2021-3420
Ubuntu 20.04gcc-snapshotFix pending
Ubuntu 20.04newlibFix pendingUBUNTU-CVE-2021-3420
Ubuntu 18.04gcc-snapshotFix pending
Ubuntu 18.04newlibFix pendingUBUNTU-CVE-2021-3420
Ubuntu 16.04gcc-snapshotFix pending
Ubuntu 16.04newlibFix pendingUBUNTU-CVE-2021-3420
Ubuntu 14.04gcc-snapshotFix pending
Ubuntu 14.04newlibFix pending
Debian 14newlibFixed4.4.0.20231231-2DEBIAN-CVE-2021-3420
Debian 14picolibcFixed1.5-1DEBIAN-CVE-2021-3420
Debian 13newlibFixed4.4.0.20231231-2DEBIAN-CVE-2021-3420
Debian 13picolibcFixed1.5-1DEBIAN-CVE-2021-3420
Debian 12newlibFixed3.3.0-1.3+deb12u1DEBIAN-CVE-2021-3420
Debian 12picolibcFixed1.5-1DEBIAN-CVE-2021-3420
Alpine Linux 3.24newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.23newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.22newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.21newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.20newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.19newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.18newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.17newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.16newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.15newlibFixed4.1.0-r0ALPINE-CVE-2021-3420
Alpine Linux 3.14newlibFixed4.1.0-r0ALPINE-CVE-2021-3420

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.