CVE-2021-33646
published 2022-08-10CVE-2021-33646: The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
PriorityP433high7.5CVSS 3.1
AVNACLPRNUINSUCNINAH
EPSS
1.44%
70.2th percentile
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
Affected
24 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | libtar | < libtar 1.2.20-8+deb12u1 (bookworm) | libtar 1.2.20-8+deb12u1 (bookworm) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| feep | libtar | < 1.2.21 | 1.2.21 |
| feep | libtar | — | — |
| feep | libtar | >= 0 < 1.2.20-8+deb12u1~deb11u1 | 1.2.20-8+deb12u1~deb11u1 |
| feep | libtar | >= 0 < 1.2.20-8+deb12u1 | 1.2.20-8+deb12u1 |
| feep | libtar | >= 0 < 1.2.20-8ubuntu0.20.04.1 | 1.2.20-8ubuntu0.20.04.1 |
| feep | libtar | >= 0 < 1.2.20-8ubuntu0.22.04.1 | 1.2.20-8ubuntu0.22.04.1 |
| feep | libtar | >= 0 < 1.2.20-8.1ubuntu0.24.04.1 | 1.2.20-8.1ubuntu0.24.04.1 |
| feep | libtar | >= 0 < 1.2.20-4ubuntu0.1~esm1 | 1.2.20-4ubuntu0.1~esm1 |
| feep | libtar | >= 0 < 1.2.20-7ubuntu0.1~esm1 | 1.2.20-7ubuntu0.1~esm1 |
| msrc | azl3_libtar_1.2.20-11_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
| msrc | cbl2_libtar_1.2.20-10_on_cbl_mariner_2.0 | — | — |
| msrc | cbl_mariner_1.0_arm | — | — |
| msrc | cbl_mariner_1.0_x64 | — | — |
| msrc | cbl_mariner_2.0_arm | — | — |
| msrc | cbl_mariner_2.0_x64 | — | — |
| msrc | cm1_libtar_1.2.20-10_on_cbl_mariner_1.0 | — | — |
| openatom | openeuler | — | — |
| openatom | openeuler | — | — |
CVSS provenance
nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
osv9.1CRITICAL
vendor_ubuntu9.1CRITICAL
vendor_debian7.5HIGH
vendor_msrc7.5HIGH
vendor_redhat7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Ubuntu
libtar vulnerabilities
vendor_ubuntu·2025-03-31·CVSS 9.1
CVE-2021-33644 [CRITICAL] libtar vulnerabilities
Title: libtar vulnerabilities
Summary: Several security issues were fixed in libtar.
It was discovered that libtar may perform out-of-bounds reads when
processing specially crafted tar files. An attacker could possibly use
this issue to cause libtar to crash, resulting in a denial of service,
or execute arbitrary code. (CVE-2021-33643, CVE-2021-33644)
It was discovered that libtar contained a memory leak due to failing
to free a variable, causing performance degradation. An attacker
could possibly use this issue to cause libtar to crash, resulting in a
denial of service. (CVE-2021-33645, CVE-2021-33646)
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
libtar: fixes for CVE-2021-33645 and CVE-2021-33646 introduced new use-after-free bugs in libtar
vendor_redhat·2022-12-09·CVSS 6.2
CVE-2021-33640 [MEDIUM] CWE-416 libtar: fixes for CVE-2021-33645 and CVE-2021-33646 introduced new use-after-free bugs in libtar
libtar: fixes for CVE-2021-33645 and CVE-2021-33646 introduced new use-after-free bugs in libtar
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).
Package: libtar (Red Hat Enterprise Linux 6) - Out of support scope
Package: libtar (Red Hat Enterprise Linux 7) - Out of support scope
Package: libtar (Red Hat Enterprise Linux 8) - Not affected
Red Hat
libtar: memory leak found in th_read() function
vendor_redhat·2022-08-10·CVSS 7.5
CVE-2021-33646 [HIGH] CWE-401 libtar: memory leak found in th_read() function
libtar: memory leak found in th_read() function
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
A flaw was found in libtar. This security vulnerability occurs because the th_read() function in libtar doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
Package: libtar (Red Hat Enterprise Linux 6) - Out of support scope
Package: libtar (Red Hat Enterprise Linux 7) - Out of support scope
Microsoft
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory which may cause a memory leak.
vendor_msrc·2022-08-09·CVSS 7.5
CVE-2021-33646 [HIGH] CWE-401 The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory which may cause a memory leak.
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory which may cause a memory leak.
FAQ: Is Azure Linux the only Microsoft product that includes this open-source library and is therefore potentially affected by this vulnerability?
One of the main benefits to our customers who choose to use the Azure Linux distro is the commitment to keep it up to date with the most recent and most secure versions of the open source libraries with which the distro is composed. Microsoft is committed to transparency in this work which is why we began publishing CSAF/VEX in October 2025. See this blog post for more information. If impact to additional products is identified, we will update the CVE to reflect this.
Mariner: Mariner
openEuler: openEuler
Customer Acti
Debian
CVE-2021-33646: libtar - The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allo...
vendor_debian·2021·CVSS 7.5
CVE-2021-33646 [HIGH] CVE-2021-33646: libtar - The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allo...
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
Scope: local
bookworm: resolved (fixed in 1.2.20-8+deb12u1)
bullseye: resolved (fixed in 1.2.20-8+deb12u1~deb11u1)
OSV
libtar vulnerabilities
osv·2025-03-31·CVSS 9.1
CVE-2021-33643 [CRITICAL] libtar vulnerabilities
libtar vulnerabilities
It was discovered that libtar may perform out-of-bounds reads when
processing specially crafted tar files. An attacker could possibly use
this issue to cause libtar to crash, resulting in a denial of service,
or execute arbitrary code. (CVE-2021-33643, CVE-2021-33644)
It was discovered that libtar contained a memory leak due to failing
to free a variable, causing performance degradation. An attacker
could possibly use this issue to cause libtar to crash, resulting in a
denial of service. (CVE-2021-33645, CVE-2021-33646)
GHSA
GHSA-x27v-rjqh-f4xc: The th_read() function doesn’t free a variable t->th_buf
ghsa_unreviewed·2022-08-11
CVE-2021-33646 [HIGH] CWE-401 GHSA-x27v-rjqh-f4xc: The th_read() function doesn’t free a variable t->th_buf
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
OSV
CVE-2021-33646: The th_read() function doesn’t free a variable t->th_buf
osv·2022-08-10·CVSS 7.5
CVE-2021-33646 [HIGH] CVE-2021-33646: The th_read() function doesn’t free a variable t->th_buf
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
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/5YSHZY753R7XW6CIKJVAWI373WW3YRRJ/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/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC/https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1807https://lists.debian.org/debian-lts-announce/2025/01/msg00026.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4S4PJRCJLEAWN2EKXGLSOBTL7O57V7NC/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/7Q26QDNOJDOFYWMJWEIK5XR62M2FF6IJ/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC/https://www.openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1807
2022-08-10
Published