CVE-2021-20291
JSON

6.5medium

Improper Locking in github.com/containers/storage

Severity
6.5medium CVSS:3.1 by NVD
Exploit likelihood
1.59% (higher than 76% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
redhat
Also known as
GHSA-7qw8-847f-pggmGO-2021-0100

Description

A deadlock vulnerability was found in 'github.com/containers/storage' in versions before 1.28.1. When a container image is processed, each layer is unpacked using `tar`. If one of those layers is not a valid `tar` archive this causes an error leading to an unexpected situation where the code indefinitely waits for the tar unpacked stream, which never finishes. An attacker could use this vulnerability to craft a malicious image, which when downloaded and stored by an application using containers/storage, would then cause a deadlock leading to a Denial of Service (DoS).

Affected

Product or packageVersionsReported by
containers/storagecontainers/storage 1.28.1CVE List
github.com/containers/storage (Go)before 1.28.1GitHub Advisory Database, Go Vulnerability Database
storage_project storagebefore 1.28.1NVD
redhat openshift_container_platform4.0NVD
redhat enterprise_linux8.0NVD
fedoraproject fedora33, 34NVD

All scores

GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
NVD7.1high CVSS:2.0AV:N/AC:M/Au:N/C:N/I:N/A:C

Classification

What each source says

CVE List

A deadlock vulnerability was found in 'github.com/containers/storage' in versions before 1.28.1. When a container image is processed, each layer is unpacked using `tar`. If one of those layers is not a valid `tar` archive this causes an error leading to an unexpected situation where the code indefinitely waits for the tar unpacked stream, which never finishes. An attacker could use this vulnerability to craft a malicious image, which when downloaded and stored by an application using containers/storage, would then cause a deadlock leading to a Denial of Service (DoS).

GitHub Advisory Database

A deadlock vulnerability was found in github.com/containers/storage in versions before 1.28.1. When a container image is processed, each layer is unpacked using tar. If one of those layers is not a valid tar archive this causes an error leading to an unexpected situation where the code indefinitely waits for the tar unpacked stream, which never finishes. An attacker could use this vulnerability to craft a malicious image, which when downloaded and stored by an application using containers/storage, would then cause a deadlock leading to a Denial of Service (DoS).

Go Vulnerability Database

Due to a goroutine deadlock, using github.com/containers/storage/pkg/archive.DecompressStream on a xz archive returns a reader which will hang indefinitely when Close is called. An attacker can use this to cause denial of service if they are able to cause the caller to attempt to decompress an archive they control.

NVD (es)

Se encontró una vulnerabilidad de interbloqueo en "github.com/containers/storage" en versiones anteriores a 1.28.1. Cuando se procesa una imagen de contenedor, cada capa se desempaqueta usando un "tar". Si una de esas capas no es un archivo "tar" válido, se produce un error que conlleva a una situación inesperada en la que el código espera indefinidamente el flujo desempaquetado de tar, que nunca termina. Un atacante podría utilizar esta vulnerabilidad para crear una imagen maliciosa, que cuando una aplicación la descarga y almacena mediante contenedores y almacenamiento, provocaría un punto muerto que conduciría a una Denegación de Servicio (DoS).

References

https://bugzilla.redhat.com/show_bug.cgi?id=1939485issue-tracking, patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKL/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNMB7O2UIXE34PGSCSOULGHPX5LIJBMM/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WX24EITRXVHDM5M223BVTJA2ODF2FSHI/vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3X/vendor-advisory
https://unit42.paloaltonetworks.com/cve-2021-20291/exploit, third-party-advisory
https://nvd.nist.gov/vuln/detail/CVE-2021-20291advisory
https://github.com/containers/storage/pull/860fix, web
https://github.com/containers/storage/commit/306fcabc964470e4b3b87a43a8f6b7d698209ee1fix, web
https://github.com/containers/storagepackage
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKLweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3Xweb

Sources

SourceRecordLicence
CVE ListCVE-2021-20291 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-7qw8-847f-pggm changed 2023-11-08CC-BY-4.0
Go Vulnerability DatabaseGO-2021-0100 changed 2024-05-20CC-BY-4.0
NVDCVE-2021-20291 changed 2026-06-17Public domain