cve.bz

CVE-2021-20291 Improper Locking

6.5 mediumExploit referenceEPSS 1.6%Fix available

Medium (6.5). EPSS 1.6% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/containers/storage 1.28.1.

On this page
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).

Severity

CVSS 3.1

6.5 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
EPSS
1.6% (unchanged from 1.6% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 76th percentile. Scored 2026-11-30. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-667 Improper Locking
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-20291 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-20291?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-20291?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-20291 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
storage_project:storagebefore 1.28.1
redhat:openshift_container_platform4.0
redhat:enterprise_linux8.0
fedoraproject:fedora33
fedoraproject:fedora34

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-7qw8-847f-pggmGogithub.com/containers/storage<1.28.11.28.1
GO-2021-0100Gogithub.com/containers/storage<1.28.11.28.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14golang-github-containers-storage1.34.1+ds1-1DEBIAN-CVE-2021-20291
Ubuntu20.04:LTSgolang-github-containers-storageno fix listedUBUNTU-CVE-2021-20291
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more0:1.19.9-1.module+el8.5.0+12236+c988d830RHBA-2022:0348
Red Hatenterprise_linux:8::appstreambuildah, buildah-tests, buildah-debuginfo and 2 more0:1.22.3-2.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcockpit-podman0:29-2.module+el8.5.0+10306+3f72d66dRHBA-2022:0348
Red Hatenterprise_linux:8::appstreamcockpit-podman0:33-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamconmon, conmon-debuginfo, conmon-debugsource2:2.0.26-1.module+el8.5.0+10306+3f72d66dRHBA-2022:0348
Red Hatenterprise_linux:8::appstreamconmon, conmon-debuginfo, conmon-debugsource2:2.0.29-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.167.0-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcontainer-selinux2:2.167.0-1.module+el8.5.0+12609+beaa716dRHBA-2022:0348
Red Hatenterprise_linux:8::appstreamcontainernetworking-plugins, containernetworking-plugins-debuginfo, containernetworking-plugins-debugsource0:0.9.1-1.module+el8.5.0+10306+3f72d66dRHBA-2022:0348
Red Hatenterprise_linux:8::appstreamcontainernetworking-plugins, containernetworking-plugins-debuginfo, containernetworking-plugins-debugsource0:1.0.0-1.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcontainers-common2:1-2.module+el8.5.0+12582+56d94c81RHSA-2021:4154
Red Hatenterprise_linux:8::appstreamcrit, criu, criu-libs and 5 more0:3.15-3.module+el8.5.0+12582+56d94c81RHSA-2021:4154
90 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-ESPOS and 12 morelibcontainers-common20210626-150100.3.15.1SUSE-SU-2022:3312-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3libcontainers-common20210626-150300.8.3.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Basesystem 15 SP3libseccomp2.5.3-150300.10.5.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Containers 15 SP3conmon2.0.30-150300.8.3.1SUSE-SU-2022:23018-1
SUSELinux Enterprise Micro 5.1, Linux Enterprise Module for Containers 15 SP3podman3.4.4-150300.9.3.2SUSE-SU-2022:23018-1
openSUSELeap 15.3conmon2.0.30-150300.8.3.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3libcontainers-common20210626-150300.8.3.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3libseccomp2.5.3-150300.10.5.1openSUSE-SU-2022:23018-1
openSUSELeap 15.3podman3.4.4-150300.9.3.2openSUSE-SU-2022:23018-1
openSUSETumbleweedlibcontainers-common20210626-7.1openSUSE-SU-2024:11757-1
AlmaLinux8buildah, buildah-tests1.19.9-1.module_el8.5.0+2614+87221ce8ALBA-2022:0348
AlmaLinux8cockpit-podman29-2.module_el8.5.0+2614+87221ce8ALBA-2022:0348
AlmaLinux8cockpit-podman29-2.module_el8.6.0+2876+9ed4eae2ALBA-2022:0348
AlmaLinux8conmon2:2.0.26-1.module_el8.5.0+2614+87221ce8ALBA-2022:0348
AlmaLinux8conmon2:2.0.26-1.module_el8.6.0+2876+9ed4eae2ALBA-2022:0348
AlmaLinux8container-selinux2:2.167.0-1.module_el8.5.0+2614+87221ce8ALBA-2022:0348
AlmaLinux8containernetworking-plugins0.9.1-1.module_el8.5.0+2614+87221ce8ALBA-2022:0348
AlmaLinux8containernetworking-plugins0.9.1-1.module_el8.6.0+2876+9ed4eae2ALBA-2022:0348
AlmaLinux8crit, criu, criu-libs and 2 more3.15-3.module_el8.5.0+2613+1b78b731ALSA-2021:4154
AlmaLinux8crit, criu, criu-libs and 2 more3.15-3.module_el8.6.0+2751+06427ca3ALSA-2021:4154
AlmaLinux8crit, criu, criu-libs and 2 more3.15-3.module_el8.6.0+2877+8e437bf5ALSA-2021:4154
AlmaLinux8crit, criu, python3-criu3.15-1.module_el8.5.0+2614+87221ce8ALBA-2022:0348
28 more for AlmaLinux in the JSON.
Rocky Linux8buildah0:1.22.3-2.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8cockpit-podman0:33-1.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8conmon2:2.0.29-1.module+el8.4.0+643+525e162aRLSA-2021:4154
Rocky Linux8conmon2:2.0.29-1.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8container-selinux2:2.167.0-1.module+el8.4.0+653+ad26b47dRLSA-2021:4154
Rocky Linux8container-selinux2:2.167.0-1.module+el8.5.0+709+440d5e7eRLSA-2021:4154
Rocky Linux8containernetworking-plugins0:1.0.0-1.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8containers-common2:1-2.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8criu0:3.15-3.module+el8.5.0+710+4c471e88RLSA-2021:4154
Rocky Linux8criu0:3.15-3.module+el8.6.0+1054+50b00ff4RLSA-2021:4154
Rocky Linux8criu0:3.15-3.module+el8.7.0+1077+0e4f03d4RLSA-2021:4154
Rocky Linux8crun0:1.0-1.module+el8.5.0+710+4c471e88RLSA-2021:4154
17 more for Rocky Linux in the JSON.
Azure Linux3buildah1.41.4-2AZL-44580

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The vulnerability was first exposed in v1.23.8 of containers/storage (and subsequently fixed in v1.28.1) with this git commit [1].

* In OpenShift Container Platform (OCP) only 4.7 contains a version of CRI-O (and openshift/ose-docker-builder) which uses a vulnerable version of containers/storage. Subsequently this has been addressed in OCP 4.7.7.

* Red Hat Quay quay-builder-container is not affected because it uses a version of github.com/containers/storage earlier than v1.23.8

* Red Hat Openshift Virtualization is not affected because all containers depending on github.com/containers/storage use a version earlier than v1.23.8

* For Red Hat OpenStack Platform, because containers/storage is not directly used by the director-operator, no update will be provided at this time for the operator containers.

[1] - https://github.com/containers/storage/blob/e9989a949a0d2c32fa82d3ff1076e33cfec58cb9/layers.go#L1332

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8container-tools:3.0-8050020220104131412.e34216c9Fixed 2022-02-01RHBA-2022:0348
Red Hat Enterprise Linux 8container-tools:rhel8-8050020210921082437.faa19cc5Fixed 2021-11-09RHSA-2021:4154
Red Hat Enterprise Linux 9podman-2:4.2.0-3.el9Fixed 2022-11-15RHSA-2022:7954
Red Hat Enterprise Linux 9skopeo-2:1.9.2-1.el9Fixed 2022-11-15RHSA-2022:7955
Red Hat Enterprise Linux 9buildah-1:1.27.0-2.el9Fixed 2022-11-15RHSA-2022:8008
Red Hat OpenShift Container Platform 4.7cri-o-0:1.20.2-6.rhaos4.7.gitf1d5201.el7Fixed 2021-04-20RHSA-2021:1150
Red Hat OpenShift Container Platform 4.7openshift-0:4.7.0-202104090228.p0.git.97111.77863f8.el7Fixed 2021-04-20RHSA-2021:1150
Red Hat OpenShift Container Platform 4.8atomic-openshift-service-idler-0:4.8.0-202106281541.p0.git.39cfc66.assembly.stream.el8Fixed 2021-07-27RHSA-2021:2437
Red Hat OpenShift Container Platform 4.8butane-0:0.12.1-1.rhaos4.8.el8Fixed 2021-07-27RHSA-2021:2437
Red Hat OpenShift Container Platform 4.8console-login-helper-messages-0:0.20.3-1.rhaos4.8.el8Fixed 2021-07-27RHSA-2021:2437
Red Hat Cluster Application Migrationopenshift-migration-plugin-containerNot affected
Red Hat Enterprise Linux 7buildahOut of support scope
Red Hat Enterprise Linux 7podmanOut of support scope
Red Hat Enterprise Linux 7skopeoOut of support scope
Red Hat Enterprise Linux 8container-tools:1.0/buildahNot affected
Red Hat Enterprise Linux 8container-tools:1.0/podmanNot affected
Red Hat Enterprise Linux 8container-tools:1.0/skopeoNot affected
Red Hat Enterprise Linux 8container-tools:2.0/buildahNot affected
Red Hat Enterprise Linux 8container-tools:2.0/podmanNot affected
Red Hat Enterprise Linux 8container-tools:2.0/skopeoNot affected
69 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-20291.

Attack patterns (CAPEC)

  • CAPEC-25 Forced Deadlock Likelihood: Low · Severity: High
  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON