Bug 2274508 (CVE-2024-29902) - CVE-2024-29902 cosign: Malicious attachments can cause system-wide denial of service
Summary: CVE-2024-29902 cosign: Malicious attachments can cause system-wide denial of ...
Keywords:
Status: NEW
Alias: CVE-2024-29902
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2274506
TreeView+ depends on / blocked
 
Reported: 2024-04-11 12:35 UTC by Marco Benatto
Modified: 2024-07-24 16:18 UTC (History)
0 users

Fixed In Version: cosign 2.2.4
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:4836 0 None None None 2024-07-24 16:18:47 UTC

Description Marco Benatto 2024-04-11 12:35:58 UTC
Cosign provides code signing and transparency for containers and binaries. Prior to version 2.2.4, a remote image with a malicious attachment can cause denial of service of the host machine running Cosign. This can impact other services on the machine that rely on having memory available such as a Redis database which can result in data loss. It can also impact the availability of other services on the machine that will not be available for the duration of the machine denial. The root cause of this issue is that Cosign reads the attachment from a remote image entirely into memory without checking the size of the attachment first. As such, a large attachment can make Cosign read a large attachment into memory; If the attachments size is larger than the machine has memory available, the machine will be denied of service. The Go runtime will make a SigKill after a few seconds of system-wide denial. This issue can allow a supply-chain escalation from a compromised registry to the Cosign user: If an attacher has compromised a registry or the account of an image vendor, they can include a malicious attachment and hurt the image consumer. Version 2.2.4 contains a patch for the vulnerability.

https://github.com/google/go-containerregistry/blob/a0658aa1d0cc7a7f1bcc4a3af9155335b6943f40/pkg/v1/remote/layer.go#L36-L40
https://github.com/sigstore/cosign/blob/9bc3ee309bf35d2f6e17f5d23f231a3d8bf580bc/pkg/oci/remote/remote.go#L228-L239
https://github.com/sigstore/cosign/commit/629f5f8fa672973503edde75f84dcd984637629e
https://github.com/sigstore/cosign/releases/tag/v2.2.4
https://github.com/sigstore/cosign/security/advisories/GHSA-88jx-383q-w4qc

Comment 2 errata-xmlrpc 2024-07-24 16:18:46 UTC
This issue has been addressed in the following products:

  Red Hat Advanced Cluster Security 4.5

Via RHSA-2024:4836 https://access.redhat.com/errata/RHSA-2024:4836


Note You need to log in before you can comment on or make changes to this bug.