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

vendor: github.com/go-jose/go-jose/v4 v4.0.5 #5867

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

thaJeztah
Copy link
Member

  • Don't allow unbounded amounts of splits. Fixes GHSA-c6gw-w398-hv78 / CVE-2025-27144
  • Various other dependency updates, small fixes, and documentation updates in the full changelog

full diff: go-jose/go-jose@v4.0.4...v4.0.5

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Update github.com/go-jose/go-jose/v4 to v4.0.5 to address [GHSA-c6gw-w398-hv78](https://github.com/go-jose/go-jose/security/advisories/GHSA-c6gw-w398-hv78) / [CVE-2025-27144](https://www.cve.org/CVERecord?id=CVE-2025-27144)

- A picture of a cute animal (not mandatory but encouraged)

Verified

This commit was signed with the committer’s verified signature.
thaJeztah Sebastiaan van Stijn
- Don't allow unbounded amounts of splits.
  Fixes GHSA-c6gw-w398-hv78 / CVE-2025-27144
- Various other dependency updates, small fixes, and documentation
  updates in the full changelog

full diff: go-jose/go-jose@v4.0.4...v4.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@codecov-commenter
Copy link

codecov-commenter commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.30%. Comparing base (41277f5) to head (7559583).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5867   +/-   ##
=======================================
  Coverage   59.30%   59.30%           
=======================================
  Files         353      353           
  Lines       29694    29694           
=======================================
  Hits        17609    17609           
  Misses      11104    11104           
  Partials      981      981           

@vvoland vvoland added this to the 28.0.1 milestone Feb 25, 2025
Comment on lines -291 to +295
parts := strings.Split(input, ".")
if len(parts) != 5 {
// Five parts is four separators
if strings.Count(input, ".") != 4 {
return nil, fmt.Errorf("go-jose/go-jose: compact JWE format must have five parts")
}
parts := strings.SplitN(input, ".", 5)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look minimal, low-risk, although I'm not sure why they didn't use the SplitN result to get the number of components, but setting the limit to expected + 1 (and produce an error if not the expected number)

Comment on lines 241 to 248
} else {
err = fmt.Errorf("go-jose/go-jose: unknown curve %s'", raw.Crv)
return fmt.Errorf("go-jose/go-jose: unknown curve %s'", raw.Crv)
}
default:
err = fmt.Errorf("go-jose/go-jose: unknown json web key type '%s'", raw.Kty)
return fmt.Errorf("go-jose/go-jose: unknown json web key type '%s'", raw.Kty)
}

if err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code flow here looks a bit dubious (naked return below); perhaps we should open a PR in upstream to clean this up

Comment on lines -330 to +334
parts := strings.Split(input, ".")
if len(parts) != 3 {
// Three parts is two separators
if strings.Count(input, ".") != 2 {
return nil, fmt.Errorf("go-jose/go-jose: compact JWS format must have three parts")
}
parts := strings.SplitN(input, ".", 3)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same / similar changes here

Comment on lines -12 to -19
**Disclaimer**: This library contains encryption software that is subject to
the U.S. Export Administration Regulations. You may not export, re-export,
transfer or download this code or any part of it in violation of any United
States law, directive or regulation. In particular this software may not be
exported or re-exported in any form or on any media to Iran, North Sudan,
Syria, Cuba, or North Korea, or to denied persons or entities mentioned on any
US maintained blocked list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was surprising, but more context in the PR;

See https://www.linuxfoundation.org/resources/publications/understanding-us-export-controls-with-open-source-projects

As an oepn source project, we can make this globally available.

Also, there's not really any encryption software in go-jose - that's all in golang's crypto libraries.

@vvoland vvoland merged commit 6bd9908 into docker:master Feb 25, 2025
104 of 107 checks passed
@thaJeztah thaJeztah deleted the bump_go_jose branch February 25, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants