CVE-2021-20291: Medium severity Storage Project Storage vulnerability
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).
Other sources
A deadlock vulnerability was found in github.com/containers/storage. 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).
The decompression functionality of github.com/containers/storage in all versions starting from v1.23.8, is susceptible to a Denial of Service (DoS) when used during container image pulls by tools like podman and cri-o.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/podmanto a version that resolves this vulnerability.Fixed in 2:4.2.0-3.el9 - Upgrade
Upgrade
redhat/skopeoto a version that resolves this vulnerability.Fixed in 2:1.9.2-1.el9 - Upgrade
Upgrade
redhat/buildahto a version that resolves this vulnerability.Fixed in 1:1.27.0-2.el9 - Upgrade
Upgrade
redhat/cri-oto a version that resolves this vulnerability.Fixed in 0:1.20.2-6.rhaos4.7.gitf1d5201.el8 - Upgrade
Upgrade
redhat/openshiftto a version that resolves this vulnerability.Fixed in 0:4.7.0-202104090228.p0.git.97111.77863f8.el8 - Upgrade
Upgrade
redhat/containers/storageto a version that resolves this vulnerability.Fixed in 1.28.1 - Upgrade
Upgrade
github.com/containers/storageto a version that resolves this vulnerability.Fixed in 1.28.1
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2021-20291?
CVE-2021-20291 has been classified with a moderate severity level due to the potential for deadlock and system hang upon processing erroneous container images.
How do I fix CVE-2021-20291?
To fix CVE-2021-20291, upgrade to the designated patched versions of affected packages, such as containers/storage version 1.28.1 or higher.
Which software is affected by CVE-2021-20291?
CVE-2021-20291 affects various software packages including Podman, Skopeo, Buildah, and CRI-O, particularly those versions before the recommended updates.
What causes the CVE-2021-20291 vulnerability?
The CVE-2021-20291 vulnerability is caused by a deadlock issue arising when a non-valid tar archive is processed while unpacking container image layers.
Is CVE-2021-20291 exploitable remotely?
CVE-2021-20291 is not directly exploitable remotely as it requires processing of container images under specific erroneous conditions.