Skip to content

Commit 52b0311

Browse files
committed
Merge branch 'main' into 2.0
2 parents 9446669 + fdafa57 commit 52b0311

File tree

187 files changed

+26403
-894
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+26403
-894
lines changed

SPECS-SIGNED/hvloader-signed/hvloader-signed.spec

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Signed HvLoader.efi for %{buildarch} systems
77
Name: hvloader-signed-%{buildarch}
88
Version: 1.0.1
9-
Release: 6%{?dist}
9+
Release: 10%{?dist}
1010
License: MIT
1111
Vendor: Microsoft Corporation
1212
Distribution: Mariner
@@ -38,8 +38,8 @@ Group: Applications/System
3838
%description -n hvloader
3939
HvLoader.efi is an EFI application for loading an external hypervisor loader.
4040

41-
HvLoader.efi loads a given hypervisor loader binary (DLL, EFI, etc.), and
42-
calls it's entry point passing HvLoader.efi ImageHandle. This way the
41+
HvLoader.efi loads a given hypervisor loader binary (DLL, EFI, etc.), and
42+
calls it's entry point passing HvLoader.efi ImageHandle. This way the
4343
hypervisor loader binary has access to HvLoader.efi's command line options,
4444
and use those as configuration parameters. The first HvLoader.efi command line
4545
option is the path to hypervisor loader binary.
@@ -69,6 +69,18 @@ popd
6969
/boot/efi/HvLoader.efi
7070

7171
%changelog
72+
* Wed Mar 26 2025 Tobias Brick <[email protected]> - 1.0.1-10
73+
- Bump release for consistency with hvloader spec.
74+
75+
* Fri Mar 21 2025 Daniel McIlvaney <[email protected]> - 1.0.1-9
76+
- Update version for consistency with hvloader spec
77+
78+
* Tue Mar 04 2025 Sreeniavsulu Malavathula <[email protected]> - 1.0.1-8
79+
- Update version for consistency with hvloader spec
80+
81+
* Mon Feb 24 2025 Kevin Lockwood <[email protected]> - 1.0.1-7
82+
- Update version for consistency with hvloader spec
83+
7284
* Mon Nov 25 2024 Zhichun Wan <[email protected]> - 1.0.1-6
7385
- Update version for consistency with hvloader spec
7486

SPECS/azcopy/CVE-2024-51744.patch

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
From 82929346de41771c3c3e3db7970644afdefa5369 Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <[email protected]>
3+
Date: Mon, 17 Mar 2025 14:33:58 -0500
4+
Subject: [PATCH] Addressing CVE-2024-51744.patch
5+
6+
---
7+
vendor/github.com/golang-jwt/jwt/v4/parser.go | 41 +++++++++----------
8+
1 file changed, 20 insertions(+), 21 deletions(-)
9+
10+
diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go
11+
index c0a6f69..9dd36e5 100644
12+
--- a/vendor/github.com/golang-jwt/jwt/v4/parser.go
13+
+++ b/vendor/github.com/golang-jwt/jwt/v4/parser.go
14+
@@ -36,19 +36,21 @@ func NewParser(options ...ParserOption) *Parser {
15+
return p
16+
}
17+
18+
-// Parse parses, validates, verifies the signature and returns the parsed token.
19+
-// keyFunc will receive the parsed token and should return the key for validating.
20+
+// Parse parses, validates, verifies the signature and returns the parsed token. keyFunc will
21+
+// receive the parsed token and should return the key for validating.
22+
func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
23+
return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc)
24+
}
25+
26+
-// ParseWithClaims parses, validates, and verifies like Parse, but supplies a default object implementing the Claims
27+
-// interface. This provides default values which can be overridden and allows a caller to use their own type, rather
28+
-// than the default MapClaims implementation of Claims.
29+
+// ParseWithClaims parses, validates, and verifies like Parse, but supplies a default object
30+
+// implementing the Claims interface. This provides default values which can be overridden and
31+
+// allows a caller to use their own type, rather than the default MapClaims implementation of
32+
+// Claims.
33+
//
34+
-// Note: If you provide a custom claim implementation that embeds one of the standard claims (such as RegisteredClaims),
35+
-// make sure that a) you either embed a non-pointer version of the claims or b) if you are using a pointer, allocate the
36+
-// proper memory for it before passing in the overall claims, otherwise you might run into a panic.
37+
+// Note: If you provide a custom claim implementation that embeds one of the standard claims (such
38+
+// as RegisteredClaims), make sure that a) you either embed a non-pointer version of the claims or
39+
+// b) if you are using a pointer, allocate the proper memory for it before passing in the overall
40+
+// claims, otherwise you might run into a panic.
41+
func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) {
42+
token, parts, err := p.ParseUnverified(tokenString, claims)
43+
if err != nil {
44+
@@ -85,12 +87,17 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
45+
return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable}
46+
}
47+
48+
+ // Perform validation
49+
+ token.Signature = parts[2]
50+
+ if err := token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
51+
+ return token, &ValidationError{Inner: err, Errors: ValidationErrorSignatureInvalid}
52+
+ }
53+
+
54+
vErr := &ValidationError{}
55+
56+
// Validate Claims
57+
if !p.SkipClaimsValidation {
58+
if err := token.Claims.Valid(); err != nil {
59+
-
60+
// If the Claims Valid returned an error, check if it is a validation error,
61+
// If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set
62+
if e, ok := err.(*ValidationError); !ok {
63+
@@ -98,22 +105,14 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
64+
} else {
65+
vErr = e
66+
}
67+
+ return token, vErr
68+
}
69+
}
70+
71+
- // Perform validation
72+
- token.Signature = parts[2]
73+
- if err = token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil {
74+
- vErr.Inner = err
75+
- vErr.Errors |= ValidationErrorSignatureInvalid
76+
- }
77+
-
78+
- if vErr.valid() {
79+
- token.Valid = true
80+
- return token, nil
81+
- }
82+
+ // No errors so far, token is valid.
83+
+ token.Valid = true
84+
85+
- return token, vErr
86+
+ return token, nil
87+
}
88+
89+
// ParseUnverified parses the token but doesn't validate the signature.
90+
--
91+
2.45.2
92+

SPECS/azcopy/CVE-2025-22868.patch

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 681b4d8edca1bcfea5bce685d77ea7b82ed3e7b3 Mon Sep 17 00:00:00 2001
2+
From: Neal Patel <[email protected]>
3+
Date: Thu, 30 Jan 2025 14:10:09 -0500
4+
Subject: [PATCH] jws: split token into fixed number of parts
5+
6+
Thanks to 'jub0bs' for reporting this issue.
7+
8+
Fixes #71490
9+
Fixes CVE-2025-22868
10+
11+
Change-Id: I2552731f46d4907f29aafe7863c558387b6bd6e2
12+
Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/652155
13+
Auto-Submit: Gopher Robot <[email protected]>
14+
Reviewed-by: Damien Neil <[email protected]>
15+
Reviewed-by: Roland Shoemaker <[email protected]>
16+
LUCI-TryBot-Result: Go LUCI <[email protected]>
17+
---
18+
vendor/golang.org/x/oauth2/jws/jws.go | 4 ++--
19+
1 file changed, 2 insertions(+), 2 deletions(-)
20+
21+
diff --git a/vendor/golang.org/x/oauth2/jws/jws.go b/vendor/golang.org/x/oauth2/jws/jws.go
22+
index 95015648b..6f03a49d3 100644
23+
--- a/vendor/golang.org/x/oauth2/jws/jws.go
24+
+++ b/vendor/golang.org/x/oauth2/jws/jws.go
25+
@@ -165,11 +165,11 @@ func Encode(header *Header, c *ClaimSet, key *rsa.PrivateKey) (string, error) {
26+
// Verify tests whether the provided JWT token's signature was produced by the private key
27+
// associated with the supplied public key.
28+
func Verify(token string, key *rsa.PublicKey) error {
29+
- parts := strings.Split(token, ".")
30+
- if len(parts) != 3 {
31+
+ if strings.Count(token, ".") != 2 {
32+
return errors.New("jws: invalid token received, token must have 3 parts")
33+
}
34+
35+
+ parts := strings.SplitN(token, ".", 3)
36+
signedContent := parts[0] + "." + parts[1]
37+
signatureString, err := base64.RawURLEncoding.DecodeString(parts[2])
38+
if err != nil {

SPECS/azcopy/CVE-2025-22870.patch

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
From 9e740dda3b87118fdd86a8afea6f3b8e01ed2aa2 Mon Sep 17 00:00:00 2001
2+
From: Sreenivasulu Malavathula <[email protected]>
3+
Date: Mon, 17 Mar 2025 14:32:13 -0500
4+
Subject: [PATCH] Addressing CVE-2025-22870
5+
6+
---
7+
vendor/golang.org/x/net/http/httpproxy/proxy.go | 10 ++++++++--
8+
1 file changed, 8 insertions(+), 2 deletions(-)
9+
10+
diff --git a/vendor/golang.org/x/net/http/httpproxy/proxy.go b/vendor/golang.org/x/net/http/httpproxy/proxy.go
11+
index 6404aaf..d89c257 100644
12+
--- a/vendor/golang.org/x/net/http/httpproxy/proxy.go
13+
+++ b/vendor/golang.org/x/net/http/httpproxy/proxy.go
14+
@@ -14,6 +14,7 @@ import (
15+
"errors"
16+
"fmt"
17+
"net"
18+
+ "net/netip"
19+
"net/url"
20+
"os"
21+
"strings"
22+
@@ -177,8 +178,10 @@ func (cfg *config) useProxy(addr string) bool {
23+
if host == "localhost" {
24+
return false
25+
}
26+
- ip := net.ParseIP(host)
27+
- if ip != nil {
28+
+ nip, err := netip.ParseAddr(host)
29+
+ var ip net.IP
30+
+ if err == nil {
31+
+ ip = net.IP(nip.AsSlice())
32+
if ip.IsLoopback() {
33+
return false
34+
}
35+
@@ -360,6 +363,9 @@ type domainMatch struct {
36+
}
37+
38+
func (m domainMatch) match(host, port string, ip net.IP) bool {
39+
+ if ip != nil {
40+
+ return false
41+
+ }
42+
if strings.HasSuffix(host, m.host) || (m.matchHost && host == m.host[1:]) {
43+
return m.port == "" || m.port == port
44+
}
45+
--
46+
2.45.2
47+

SPECS/azcopy/CVE-2025-30204.patch

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
From 84c7f3d0b9dccb4a20d0ad4de10896d40344ba26 Mon Sep 17 00:00:00 2001
2+
From: Kanishk-Bansal <[email protected]>
3+
Date: Fri, 28 Mar 2025 20:43:26 +0000
4+
Subject: [PATCH] CVE-2025-30204
5+
Upstream Patch Reference :
6+
v4 : https://github.com/golang-jwt/jwt/commit/2f0e9add62078527821828c76865661aa7718a84
7+
v5 : https://github.com/golang-jwt/jwt/commit/0951d184286dece21f73c85673fd308786ffe9c3
8+
---
9+
github.com/golang-jwt/jwt/v4/parser.go | 36 +++++++++++++++++++++++---
10+
github.com/golang-jwt/jwt/v5/parser.go | 36 +++++++++++++++++++++++---
11+
2 files changed, 66 insertions(+), 6 deletions(-)
12+
13+
diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go
14+
index c0a6f69..8e7e67c 100644
15+
--- a/vendor/github.com/golang-jwt/jwt/v4/parser.go
16+
+++ b/vendor/github.com/golang-jwt/jwt/v4/parser.go
17+
@@ -7,6 +7,8 @@ import (
18+
"strings"
19+
)
20+
21+
+const tokenDelimiter = "."
22+
+
23+
type Parser struct {
24+
// If populated, only these methods will be considered valid.
25+
//
26+
@@ -123,9 +125,10 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
27+
// It's only ever useful in cases where you know the signature is valid (because it has
28+
// been checked previously in the stack) and you want to extract values from it.
29+
func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) {
30+
- parts = strings.Split(tokenString, ".")
31+
- if len(parts) != 3 {
32+
- return nil, parts, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed)
33+
+ var ok bool
34+
+ parts, ok = splitToken(tokenString)
35+
+ if !ok {
36+
+ return nil, nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed)
37+
}
38+
39+
token = &Token{Raw: tokenString}
40+
@@ -175,3 +178,30 @@ func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Toke
41+
42+
return token, parts, nil
43+
}
44+
+
45+
+// splitToken splits a token string into three parts: header, claims, and signature. It will only
46+
+// return true if the token contains exactly two delimiters and three parts. In all other cases, it
47+
+// will return nil parts and false.
48+
+func splitToken(token string) ([]string, bool) {
49+
+ parts := make([]string, 3)
50+
+ header, remain, ok := strings.Cut(token, tokenDelimiter)
51+
+ if !ok {
52+
+ return nil, false
53+
+ }
54+
+ parts[0] = header
55+
+ claims, remain, ok := strings.Cut(remain, tokenDelimiter)
56+
+ if !ok {
57+
+ return nil, false
58+
+ }
59+
+ parts[1] = claims
60+
+ // One more cut to ensure the signature is the last part of the token and there are no more
61+
+ // delimiters. This avoids an issue where malicious input could contain additional delimiters
62+
+ // causing unecessary overhead parsing tokens.
63+
+ signature, _, unexpected := strings.Cut(remain, tokenDelimiter)
64+
+ if unexpected {
65+
+ return nil, false
66+
+ }
67+
+ parts[2] = signature
68+
+
69+
+ return parts, true
70+
+}
71+
diff --git a/vendor/github.com/golang-jwt/jwt/v5/parser.go b/vendor/github.com/golang-jwt/jwt/v5/parser.go
72+
index ecf99af..054c7eb 100644
73+
--- a/vendor/github.com/golang-jwt/jwt/v5/parser.go
74+
+++ b/vendor/github.com/golang-jwt/jwt/v5/parser.go
75+
@@ -8,6 +8,8 @@ import (
76+
"strings"
77+
)
78+
79+
+const tokenDelimiter = "."
80+
+
81+
type Parser struct {
82+
// If populated, only these methods will be considered valid.
83+
validMethods []string
84+
@@ -136,9 +138,10 @@ func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyf
85+
// It's only ever useful in cases where you know the signature is valid (since it has already
86+
// been or will be checked elsewhere in the stack) and you want to extract values from it.
87+
func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) {
88+
- parts = strings.Split(tokenString, ".")
89+
- if len(parts) != 3 {
90+
- return nil, parts, newError("token contains an invalid number of segments", ErrTokenMalformed)
91+
+ var ok bool
92+
+ parts, ok = splitToken(tokenString)
93+
+ if !ok {
94+
+ return nil, nil, newError("token contains an invalid number of segments", ErrTokenMalformed)
95+
}
96+
97+
token = &Token{Raw: tokenString}
98+
@@ -196,6 +199,33 @@ func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Toke
99+
return token, parts, nil
100+
}
101+
102+
+// splitToken splits a token string into three parts: header, claims, and signature. It will only
103+
+// return true if the token contains exactly two delimiters and three parts. In all other cases, it
104+
+// will return nil parts and false.
105+
+func splitToken(token string) ([]string, bool) {
106+
+ parts := make([]string, 3)
107+
+ header, remain, ok := strings.Cut(token, tokenDelimiter)
108+
+ if !ok {
109+
+ return nil, false
110+
+ }
111+
+ parts[0] = header
112+
+ claims, remain, ok := strings.Cut(remain, tokenDelimiter)
113+
+ if !ok {
114+
+ return nil, false
115+
+ }
116+
+ parts[1] = claims
117+
+ // One more cut to ensure the signature is the last part of the token and there are no more
118+
+ // delimiters. This avoids an issue where malicious input could contain additional delimiters
119+
+ // causing unecessary overhead parsing tokens.
120+
+ signature, _, unexpected := strings.Cut(remain, tokenDelimiter)
121+
+ if unexpected {
122+
+ return nil, false
123+
+ }
124+
+ parts[2] = signature
125+
+
126+
+ return parts, true
127+
+}
128+
+
129+
// DecodeSegment decodes a JWT specific base64url encoding. This function will
130+
// take into account whether the [Parser] is configured with additional options,
131+
// such as [WithStrictDecoding] or [WithPaddingAllowed].
132+
--
133+
2.45.2
134+

SPECS/azcopy/azcopy.spec

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: The new Azure Storage data transfer utility - AzCopy v10
22
Name: azcopy
33
Version: 10.25.1
4-
Release: 2%{?dist}
4+
Release: 5%{?dist}
55
License: MIT
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -27,6 +27,10 @@ Source0: https://github.com/Azure/azure-storage-azcopy/archive/refs/tags/
2727
# See: https://reproducible-builds.org/docs/archives/
2828
# - For the value of "--mtime" use the date "2021-04-26 00:00Z" to simplify future updates.
2929
Source1: azure-storage-%{name}-%{version}-vendor.tar.gz
30+
Patch0: CVE-2025-22868.patch
31+
Patch1: CVE-2025-22870.patch
32+
Patch2: CVE-2024-51744.patch
33+
Patch3: CVE-2025-30204.patch
3034

3135
BuildRequires: golang
3236
BuildRequires: git
@@ -63,6 +67,15 @@ go test -mod=vendor
6367
%{_bindir}/azcopy
6468

6569
%changelog
70+
* Fri Mar 28 2025 Kanishk Bansal <[email protected]> - 10.25.1-5
71+
- Patch CVE-2025-30204
72+
73+
* Mon Mar 17 2025 Sreeniavsulu Malavathula <[email protected]> - 10.25.1-4
74+
- Fix CVE-2025-22870, CVE-2024-51744 with an upstream patch
75+
76+
* Tue Mar 04 2025 Kanishk Bansal <[email protected]> - 10.25.1-3
77+
- Fix CVE-2025-22868 with an upstream patch
78+
6679
* Mon Sep 09 2024 CBL-Mariner Servicing Account <[email protected]> - 10.25.1-2
6780
- Bump release to rebuild with go 1.22.7
6881

0 commit comments

Comments
 (0)