Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

renovate-bot
Copy link
Contributor

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/sigstore/cosign/v2 require minor v2.1.1 -> v2.2.1

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

v2.2.0

Compare Source

Enhancements

  • switch to uploading DSSE types to rekor instead of intoto (#​3113)
  • add 'cosign sign' command-line parameters for mTLS (#​3052)
  • improve error messages around bundle != payload hash (#​3146)
  • make VerifyImageAttestation function public (#​3156)
  • Switch to cryptoutils function for SANS (#​3185)
  • Handle HTTP_1_1_REQUIRED errors in github provider (#​3172)

Bug Fixes

  • Fix nondeterminsitic timestamps (#​3121)

Documentation

  • doc: Add example of sign-blob with key in env var (#​3152)
  • add deprecation notice for cosign-releases GCS bucket (#​3148)
  • update doc links (#​3186)

Others

  • Upgrade to go1.21 (#​3188)
  • Updates ci tests (#​3142)
  • test using latest release of scaffolding (#​3187)
  • ci: free up disk space for the gh runner (#​3169)
  • update go-github to v53 (#​3116)
  • call e2e test for cosign attach (#​3112)
  • bump build cross to use go1.20.6 and cosign image to 2.1.1 (#​3108)

Contributors

  • Bob Callaway
  • Carlos Tadeu Panato Junior
  • Dmitry Savintsev
  • Hayden B
  • Hector Fernandez
  • Jason Hall
  • Jon Johnson
  • Jubril Oyetunji
  • Paulo Gomes
  • Priya Wadhwa
  • 张志强

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.

…urity]

Signed-off-by: Mend Renovate <bot@renovateapp.com>
@renovate-bot renovate-bot deleted the renovate/go-github.com/sigstore/cosign/v2-vulnerability branch November 10, 2023 22:41
Copy link

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (v2.2.1). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant