Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [security] #2326

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 9, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/sigstore/cosign/v2 v2.2.0 -> v2.2.1 age adoption passing confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

GitHub Vulnerability Alerts

CVE-2023-46737

Summary

Cosign is susceptible to a denial of service by an attacker controlled registry. An attacker who controls a remote registry can return a high number of attestations and/or signatures to Cosign and cause Cosign to enter a long loop resulting in an endless data attack. The root cause is that Cosign loops through all attestations fetched from the remote registry in pkg/cosign.FetchAttestations.

The attacker needs to compromise the registry or make a request to a registry they control. When doing so, the attacker must return a high number of attestations in the response to Cosign. The result will be that the attacker can cause Cosign to go into a long or infinite loop that will prevent other users from verifying their data. In Kyvernos case, an attacker whose privileges are limited to making requests to the cluster can make a request with an image reference to their own registry, trigger the infinite loop and deny other users from completing their admission requests. Alternatively, the attacker can obtain control of the registry used by an organization and return a high number of attestations instead the expected number of attestations.

The vulnerable loop in Cosign starts on line 154 below:
https://github.com/sigstore/cosign/blob/004443228442850fb28f248fd59765afad99b6df/pkg/cosign/fetch.go#L135-L196

The l slice is controllable by an attacker who controls the remote registry.

Many cloud-native projects consider the remote registry to be untrusted, including Crossplane, Notary and Kyverno. We consider the same to be the case for Cosign, since users are not in control of whether the registry returns the expected data.

TUF's security model labels this type of vulnerability an "Endless data attack", but an attacker could use this as a type of rollback attack, in case the user attempts to deploy a patched version of a vulnerable image; The attacker could prevent this upgrade by causing Cosign to get stuck in an infinite loop and never complete.

Mitigation

The issue can be mitigated rather simply by setting a limit to the limit of attestations that Cosign will loop through. The limit does not need to be high to be within the vast majority of use cases and still prevent the endless data attack.


Release Notes

sigstore/cosign (github.com/sigstore/cosign/v2)

v2.2.1

Compare Source

Note: This release comes with a fix for CVE-2023-46737 described in this Github Security Advisory. Please upgrade to this release ASAP

Enhancements

  • feat: Support basic auth and bearer auth login to registry (#​3310)
  • add support for ignoring certificates with pkcs11 (#​3334)
  • Support ReplaceOp in Signatures (#​3315)
  • feat: added ability to get image digest back via triangulate (#​3255)
  • feat: add --only flag in cosign copy to copy sign, att & sbom (#​3247)
  • feat: add support attaching a Rekor bundle to a container (#​3246)
  • feat: add support outputting rekor response on signing (#​3248)
  • feat: improve dockerfile verify subcommand (#​3264)
  • Add guard flag for experimental OCI 1.1 verify. (#​3272)
  • Deprecate SBOM attachments (#​3256)
  • feat: dedent line in cosign copy doc (#​3244)
  • feat: add platform flag to cosign copy command (#​3234)
  • Add SLSA 1.0 attestation support to cosign. Closes #​2860 (#​3219)
  • attest: pass OCI remote opts to att resolver. (#​3225)

Bug Fixes

  • Merge pull request from GHSA-vfp6-jrw2-99g9
  • fix: allow cosign download sbom when image is absent (#​3245)
  • ci: add a OCI registry test for referrers support (#​3253)
  • Fix ReplaceSignatures (#​3292)
  • Stop using deprecated in_toto.ProvenanceStatement (#​3243)
  • Fixes #​3236, disable SCT checking for a cosign verification when usin… (#​3237)
  • fix: update error in SignedEntity to be more descriptive (#​3233)
  • Fail timestamp verification if no root is provided (#​3224)

Documentation

  • Add some docs about verifying in an air-gapped environment (#​3321)
  • Update CONTRIBUTING.md (#​3268)
  • docs: improves the Contribution guidelines (#​3257)
  • Remove security policy (#​3230)

Others

  • Set go to min 1.21 and update dependencies (#​3327)
  • Update contact for code of conduct (#​3266)
  • Update .ko.yaml (#​3240)

Contributors

  • AdamKorcz
  • Andres Galante
  • Appu
  • Billy Lynch
  • Bob Callaway
  • Caleb Woodbine
  • Carlos Tadeu Panato Junior
  • Dylan Richardson
  • Gareth Healy
  • Hayden B
  • John Kjell
  • Jon Johnson
  • jonvnadelberg
  • Luiz Carvalho
  • Priya Wadhwa
  • Ramkumar Chinchani
  • Tosone
  • Ville Aikas
  • Vishal Choudhary
  • ziel

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the security label Nov 9, 2023
Copy link

cloudflare-workers-and-pages bot commented Nov 9, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 924273a
Status: ✅  Deploy successful!
Preview URL: https://abc38cde.acorn.pages.dev
Branch Preview URL: https://renovate-go-github-com-sigst.acorn.pages.dev

View logs

@renovate renovate bot changed the title fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [security] Update module github.com/sigstore/cosign/v2 to v2.2.1 [SECURITY] Nov 15, 2023
@renovate renovate bot force-pushed the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch 2 times, most recently from e8a3811 to 20ed5b4 Compare November 17, 2023 16:53
@renovate renovate bot changed the title Update module github.com/sigstore/cosign/v2 to v2.2.1 [SECURITY] fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [security] Nov 21, 2023
@renovate renovate bot force-pushed the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch from 20ed5b4 to 76cbe8f Compare December 21, 2023 05:31
@renovate renovate bot changed the title fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [security] Update module github.com/sigstore/cosign/v2 to v2.2.1 [SECURITY] Jan 3, 2024
@renovate renovate bot force-pushed the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch from 76cbe8f to eeb4c61 Compare January 5, 2024 02:24
@renovate renovate bot changed the title Update module github.com/sigstore/cosign/v2 to v2.2.1 [SECURITY] fix(deps): update module github.com/sigstore/cosign/v2 to v2.2.1 [security] Jan 10, 2024
@renovate renovate bot force-pushed the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch 2 times, most recently from cfbbc4d to dc78b9b Compare January 15, 2024 18:43
@renovate renovate bot force-pushed the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch from dc78b9b to 924273a Compare January 19, 2024 18:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant