CVE-2021-3826 Memory corruption in gcc

Medium 6.5 Published Updated

Attackers can cause a denial of service via a crafted mangled symbol triggering a buffer overflow in the libiberty demangling function.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-3826?

CVE-2021-3826 is a medium-severity memory corruption vulnerability in Fedoraproject Fedora, published on 1 Sep 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Heap/stack buffer overflow in the dlang_lname function in d-demangle.c in libiberty allows attackers to potentially cause a denial of service (segmentation fault and crash) via a crafted mangled symbol.

Weakness: CWE-787, CWE-119

Which versions are affected by CVE-2021-3826?

It affects 2 products.

Linux distribution packages (12)
gdb AlmaLinux:9All versions10.2-11.el9
gdb-doc AlmaLinux:9All versions10.2-11.el9
gdb-gdbserver AlmaLinux:9All versions10.2-11.el9
gdb-headless AlmaLinux:9All versions10.2-11.el9
gdb-minimal AlmaLinux:9All versions10.2-11.el9
gdb Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-doc Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-gdbserver Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-headless Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9
gdb-minimal Red Hat:enterprise_linux:9::appstreamAll versions0:10.2-11.el9

Products include Fedoraproject Fedora, Gnu Gcc.

How do I fix CVE-2021-3826?

Apply the vendor's patch.

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

Is CVE-2021-3826 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as ALSA-2023:6372, CLSA-2024-1718787131, CLSA-2026-1777465067, CLSA-2026-1778020045, CLSA-2026-1780133935, DEBIAN-CVE-2021-3826 and 3 more.

Is CVE-2021-3826 in your software?

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

Check your SBOMs for free