CVE-2021-20291
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).
02 / AFFECTED SOFTWARE
Affected packages
13 explicit affected versions
03 / CONNECTIONS
Connected vulnerabilities
04 / EVIDENCE
Source records
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).
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.
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).
05 / REFERENCES
Further evidence
- https://bugzilla.redhat.com/show_bug.cgi?id=1939485
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKL/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3X/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WX24EITRXVHDM5M223BVTJA2ODF2FSHI/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZNMB7O2UIXE34PGSCSOULGHPX5LIJBMM/
- https://unit42.paloaltonetworks.com/cve-2021-20291/
- https://github.com/containers/storage/commit/306fcabc964470e4b3b87a43a8f6b7d698209ee1
- https://github.com/containers/storage/pull/860
- https://github.com/containers/storage
- https://lists.fedoraproject.org/archives/list/[email protected]/message/R5D7XL7FL24TWFMGQ3K2S72EOUSLZMKL
- https://lists.fedoraproject.org/archives/list/[email protected]/message/SPYOHNG2Q7DCAQZMGYLMENLKALGDLG3X
- https://lists.fedoraproject.org/archives/list/[email protected]/message/WX24EITRXVHDM5M223BVTJA2ODF2FSHI
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZNMB7O2UIXE34PGSCSOULGHPX5LIJBMM
- https://nvd.nist.gov/vuln/detail/CVE-2021-20291
- https://pkg.go.dev/vuln/GO-2021-0100
- https://unit42.paloaltonetworks.com/cve-2021-20291