From 9033ed28cbae8fbb080cccc6f202fb4cf080f9c3 Mon Sep 17 00:00:00 2001 From: zhaoyifan Date: Fri, 14 Nov 2025 11:31:27 +0800 Subject: [PATCH] [backport]fix CVE-2025-58187,CVE-2025-61723 (cherry picked from commit 31d334e4375f46e46a1d193825d7847d6857d911) --- ...509-improve-domain-name-verification.patch | 364 ++++++++++++ ...o-x509-rework-fix-for-CVE-2025-58187.patch | 538 ++++++++++++++++++ ...ng-pem-make-Decode-complexity-linear.patch | 220 +++++++ golang.spec | 11 +- 4 files changed, 1132 insertions(+), 1 deletion(-) create mode 100644 backport-0042-CVE-2025-58187-crypto-x509-improve-domain-name-verification.patch create mode 100644 backport-0043-CVE-2025-58187-crypto-x509-rework-fix-for-CVE-2025-58187.patch create mode 100644 backport-0044-CVE-2025-61723-encoding-pem-make-Decode-complexity-linear.patch diff --git a/backport-0042-CVE-2025-58187-crypto-x509-improve-domain-name-verification.patch b/backport-0042-CVE-2025-58187-crypto-x509-improve-domain-name-verification.patch new file mode 100644 index 0000000..543bc56 --- /dev/null +++ b/backport-0042-CVE-2025-58187-crypto-x509-improve-domain-name-verification.patch @@ -0,0 +1,364 @@ +From 3fc4c79fdbb17b9b29ea9f8c29dd780df075d4c4 Mon Sep 17 00:00:00 2001 +From: Neal Patel +Date: Mon, 15 Sep 2025 16:31:22 -0400 +Subject: [PATCH] crypto/x509: improve domain name verification + +Don't use domainToReverseLabels to check if domain names are valid, +since it is not particularly performant, and can contribute to DoS +vectors. Instead just iterate over the name and enforce the properties +we care about. + +This also enforces that DNS names, both in SANs and name constraints, +are valid. We previously allowed invalid SANs, because some +intermediates had these weird names (see #23995), but there are +currently no trusted intermediates that have this property, and since we +target the web PKI, supporting this particular case is not a high +priority. + +Thank you to Jakub Ciolek for reporting this issue. + +Fixes CVE-2025-58187 +Fixes #75681 + +Change-Id: I6ebce847dcbe5fc63ef2f9a74f53f11c4c56d3d1 +Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2820 +Reviewed-by: Damien Neil +Reviewed-by: Roland Shoemaker +Reviewed-on: https://go-review.googlesource.com/c/go/+/709854 +Auto-Submit: Michael Pratt +Reviewed-by: Carlos Amedee +LUCI-TryBot-Result: Go LUCI + +Backported-by: zhaoyifan +Reference: https://go-review.googlesource.com/c/go/+/709854 +Conflict: parser.go +--- + src/crypto/x509/name_constraints_test.go | 68 ++---------------- + src/crypto/x509/parser.go | 90 +++++++++++++++++------- + src/crypto/x509/parser_test.go | 37 ++++++++++ + src/crypto/x509/verify.go | 1 + + 4 files changed, 110 insertions(+), 86 deletions(-) + +diff --git a/src/crypto/x509/name_constraints_test.go b/src/crypto/x509/name_constraints_test.go +index f73eeca..e1c5f2a 100644 +--- a/src/crypto/x509/name_constraints_test.go ++++ b/src/crypto/x509/name_constraints_test.go +@@ -1456,63 +1456,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + expectedError: "incompatible key usage", + }, + +- // An invalid DNS SAN should be detected only at validation time so +- // that we can process CA certificates in the wild that have invalid SANs. +- // See https://github.com/golang/go/issues/23995 +- +- // #77: an invalid DNS or mail SAN will not be detected if name constraint +- // checking is not triggered. +- { +- roots: make([]constraintsSpec, 1), +- intermediates: [][]constraintsSpec{ +- { +- {}, +- }, +- }, +- leaf: leafSpec{ +- sans: []string{"dns:this is invalid", "email:this @ is invalid"}, +- }, +- }, +- +- // #78: an invalid DNS SAN will be detected if any name constraint checking +- // is triggered. +- { +- roots: []constraintsSpec{ +- { +- bad: []string{"uri:"}, +- }, +- }, +- intermediates: [][]constraintsSpec{ +- { +- {}, +- }, +- }, +- leaf: leafSpec{ +- sans: []string{"dns:this is invalid"}, +- }, +- expectedError: "cannot parse dnsName", +- }, +- +- // #79: an invalid email SAN will be detected if any name constraint +- // checking is triggered. +- { +- roots: []constraintsSpec{ +- { +- bad: []string{"uri:"}, +- }, +- }, +- intermediates: [][]constraintsSpec{ +- { +- {}, +- }, +- }, +- leaf: leafSpec{ +- sans: []string{"email:this @ is invalid"}, +- }, +- expectedError: "cannot parse rfc822Name", +- }, +- +- // #80: if several EKUs are requested, satisfying any of them is sufficient. ++ // #77: if several EKUs are requested, satisfying any of them is sufficient. + { + roots: make([]constraintsSpec, 1), + intermediates: [][]constraintsSpec{ +@@ -1527,7 +1471,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + requestedEKUs: []ExtKeyUsage{ExtKeyUsageClientAuth, ExtKeyUsageEmailProtection}, + }, + +- // #81: EKUs that are not asserted in VerifyOpts are not required to be ++ // #78: EKUs that are not asserted in VerifyOpts are not required to be + // nested. + { + roots: make([]constraintsSpec, 1), +@@ -1546,7 +1490,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #82: a certificate without SANs and CN is accepted in a constrained chain. ++ // #79: a certificate without SANs and CN is accepted in a constrained chain. + { + roots: []constraintsSpec{ + { +@@ -1563,7 +1507,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #83: a certificate without SANs and with a CN that does not parse as a ++ // #80: a certificate without SANs and with a CN that does not parse as a + // hostname is accepted in a constrained chain. + { + roots: []constraintsSpec{ +@@ -1582,7 +1526,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #84: a certificate with SANs and CN is accepted in a constrained chain. ++ // #81: a certificate with SANs and CN is accepted in a constrained chain. + { + roots: []constraintsSpec{ + { +@@ -1599,7 +1543,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + cn: "foo.bar", + }, + }, +- // #86: URIs with IPv6 addresses with zones and ports are rejected ++ // #83: URIs with IPv6 addresses with zones and ports are rejected + { + roots: []constraintsSpec{ + { +diff --git a/src/crypto/x509/parser.go b/src/crypto/x509/parser.go +index 6695212..c67fdd0 100644 +--- a/src/crypto/x509/parser.go ++++ b/src/crypto/x509/parser.go +@@ -370,6 +370,60 @@ func forEachSAN(der cryptobyte.String, callback func(tag int, data []byte) error + return nil + } + ++// domainNameValid checks the structure of a DNS name or similar name from a ++// certificate. If constraint is true, it checks additional properties required ++// for name constraints. ++// ++// This enforces the property that each label of a domain has a maximum length ++// of 63 characters, and so on. See ++// https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4. ++func domainNameValid(s string, constraint bool) bool { ++ if len(s) == 0 { ++ return false ++ } ++ ++ // There must not be a trailing period, although a trailing period during ++ // matching is handled by trimming it in matchDomainConstraint and ++ // matchHostnames. ++ if s[len(s)-1] == '.' { ++ return false ++ } ++ ++ // https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4 ++ // 255 octets or less. ++ if len(s) > 253 { ++ return false ++ } ++ ++ labelStart := 0 ++ for i := 0; i < len(s); i++ { ++ c := s[i] ++ if c == '.' { ++ labelLen := i - labelStart ++ if labelLen == 0 { ++ // Empty label, invalid unless this is the first character and ++ // constraint is true, in which case it's used to match the ++ // domain and all subdomains. ++ if i != 0 || !constraint { ++ return false ++ } ++ } ++ // https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4 ++ // labels 63 octets or less. ++ if labelLen > 63 { ++ return false ++ } ++ labelStart = i + 1 ++ } ++ } ++ // Check the last label. ++ if labelLen := len(s) - labelStart; labelLen == 0 || labelLen > 63 { ++ return false ++ } ++ ++ return true ++} ++ + func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string, ipAddresses []net.IP, uris []*url.URL, err error) { + err = forEachSAN(der, func(tag int, data []byte) error { + switch tag { +@@ -378,12 +432,18 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string + if err := isIA5String(email); err != nil { + return errors.New("x509: SAN rfc822Name is malformed") + } ++ if _, ok := parseRFC2821Mailbox(email); !ok { ++ return fmt.Errorf("x509: cannot parse rfc822Name %q", email) ++ } + emailAddresses = append(emailAddresses, email) + case nameTypeDNS: + name := string(data) + if err := isIA5String(name); err != nil { + return errors.New("x509: SAN dNSName is malformed") + } ++ if !domainNameValid(name, false) { ++ return fmt.Errorf("x509: cannot parse dnsName %q", name) ++ } + dnsNames = append(dnsNames, string(name)) + case nameTypeURI: + uriStr := string(data) +@@ -395,7 +455,9 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string + return fmt.Errorf("x509: cannot parse URI %q: %s", uriStr, err) + } + if len(uri.Host) > 0 { +- if _, ok := domainToReverseLabels(uri.Host); !ok { ++ if _, _, err := net.SplitHostPort(uri.Host); err == nil { ++ // Ignore the error: it's valid to have a host with a port. ++ } else if !domainNameValid(uri.Host, false) && net.ParseIP(uri.Host) == nil { + return fmt.Errorf("x509: cannot parse URI %q: invalid domain", uriStr) + } + } +@@ -538,15 +600,7 @@ func parseNameConstraintsExtension(out *Certificate, e pkix.Extension) (unhandle + return nil, nil, nil, nil, errors.New("x509: invalid constraint value: " + err.Error()) + } + +- trimmedDomain := domain +- if len(trimmedDomain) > 0 && trimmedDomain[0] == '.' { +- // constraints can have a leading +- // period to exclude the domain +- // itself, but that's not valid in a +- // normal domain name. +- trimmedDomain = trimmedDomain[1:] +- } +- if _, ok := domainToReverseLabels(trimmedDomain); !ok { ++ if !domainNameValid(domain, true) { + return nil, nil, nil, nil, fmt.Errorf("x509: failed to parse dnsName constraint %q", domain) + } + dnsNames = append(dnsNames, domain) +@@ -588,11 +642,7 @@ func parseNameConstraintsExtension(out *Certificate, e pkix.Extension) (unhandle + } + } else { + // Otherwise it's a domain name. +- domain := constraint +- if len(domain) > 0 && domain[0] == '.' { +- domain = domain[1:] +- } +- if _, ok := domainToReverseLabels(domain); !ok { ++ if !domainNameValid(constraint, true) { + return nil, nil, nil, nil, fmt.Errorf("x509: failed to parse rfc822Name constraint %q", constraint) + } + } +@@ -608,15 +658,7 @@ func parseNameConstraintsExtension(out *Certificate, e pkix.Extension) (unhandle + return nil, nil, nil, nil, fmt.Errorf("x509: failed to parse URI constraint %q: cannot be IP address", domain) + } + +- trimmedDomain := domain +- if len(trimmedDomain) > 0 && trimmedDomain[0] == '.' { +- // constraints can have a leading +- // period to exclude the domain itself, +- // but that's not valid in a normal +- // domain name. +- trimmedDomain = trimmedDomain[1:] +- } +- if _, ok := domainToReverseLabels(trimmedDomain); !ok { ++ if !domainNameValid(domain, true) { + return nil, nil, nil, nil, fmt.Errorf("x509: failed to parse URI constraint %q", domain) + } + uriDomains = append(uriDomains, domain) +diff --git a/src/crypto/x509/parser_test.go b/src/crypto/x509/parser_test.go +index b31f9cd..ede5235 100644 +--- a/src/crypto/x509/parser_test.go ++++ b/src/crypto/x509/parser_test.go +@@ -6,6 +6,7 @@ package x509 + + import ( + "encoding/asn1" ++ "strings" + "testing" + + cryptobyte_asn1 "golang.org/x/crypto/cryptobyte/asn1" +@@ -101,3 +102,39 @@ func TestParseASN1String(t *testing.T) { + }) + } + } ++ ++func TestDomainNameValid(t *testing.T) { ++ tests := []struct { ++ name string ++ domain string ++ constraint bool ++ want bool ++ }{ ++ {"empty string", "", false, false}, ++ {"valid domain", "example.com", false, true}, ++ {"valid subdomain", "sub.example.com", false, true}, ++ {"trailing period", "example.com.", false, false}, ++ {"leading period non-constraint", ".example.com", false, false}, ++ {"leading period constraint", ".example.com", true, true}, ++ {"double period", "example..com", false, false}, ++ {"too long", strings.Repeat("a", 254), false, false}, ++ {"exactly 253 chars", strings.Repeat("a", 240) + ".example.com", false, true}, ++ {"label too long", strings.Repeat("a", 64) + ".example.com", false, false}, ++ {"label exactly 63 chars", strings.Repeat("a", 63) + ".example.com", false, true}, ++ {"single label", "localhost", false, true}, ++ {"only period non-constraint", ".", false, false}, ++ {"only period constraint", ".", true, false}, ++ {"multiple labels", "a.b.c.d.e.f.g", false, true}, ++ {"empty label at start", ".example", false, false}, ++ {"empty label at end", "example.", false, false}, ++ {"hyphen at start", "-example.com", false, true}, ++ } ++ ++ for _, tt := range tests { ++ t.Run(tt.name, func(t *testing.T) { ++ if got := domainNameValid(tt.domain, tt.constraint); got != tt.want { ++ t.Errorf("domainNameValid(%q, %v) = %v, want %v", tt.domain, tt.constraint, got, tt.want) ++ } ++ }) ++ } ++} +diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go +index c49e233..237cfeb 100644 +--- a/src/crypto/x509/verify.go ++++ b/src/crypto/x509/verify.go +@@ -360,6 +360,7 @@ func parseRFC2821Mailbox(in string) (mailbox rfc2821Mailbox, ok bool) { + // domainToReverseLabels converts a textual domain name like foo.example.com to + // the list of labels in reverse order, e.g. ["com", "example", "foo"]. + func domainToReverseLabels(domain string) (reverseLabels []string, ok bool) { ++ reverseLabels = make([]string, 0, strings.Count(domain, ".")+1) + for len(domain) > 0 { + if i := strings.LastIndexByte(domain, '.'); i == -1 { + reverseLabels = append(reverseLabels, domain) +-- +2.33.0 + diff --git a/backport-0043-CVE-2025-58187-crypto-x509-rework-fix-for-CVE-2025-58187.patch b/backport-0043-CVE-2025-58187-crypto-x509-rework-fix-for-CVE-2025-58187.patch new file mode 100644 index 0000000..dcb27f4 --- /dev/null +++ b/backport-0043-CVE-2025-58187-crypto-x509-rework-fix-for-CVE-2025-58187.patch @@ -0,0 +1,538 @@ +From 1cd71689f2ed8f07031a0cc58fc3586ca501839f Mon Sep 17 00:00:00 2001 +From: Roland Shoemaker +Date: Thu, 9 Oct 2025 13:35:24 -0700 +Subject: [PATCH] crypto/x509: rework fix for CVE-2025-58187 + +In CL 709854 we enabled strict validation for a number of properties of +domain names (and their constraints). This caused significant breakage, +since we didn't previously disallow the creation of certificates which +contained these malformed domains. + +Rollback a number of the properties we enforced, making domainNameValid +only enforce the same properties that domainToReverseLabels does. Since +this also undoes some of the DoS protections our initial fix enabled, +this change also adds caching of constraints in isValid (which perhaps +is the fix we should've initially chosen). + +Updates #75835 +Fixes #75828 + +Change-Id: Ie6ca6b4f30e9b8a143692b64757f7bbf4671ed0e +Reviewed-on: https://go-review.googlesource.com/c/go/+/710735 +LUCI-TryBot-Result: Go LUCI +Reviewed-by: Damien Neil + +Backported-by: zhaoyifan +Reference: https://go-review.googlesource.com/c/go/+/710735 +Conflict: parser.go parser_test.go +--- + src/crypto/x509/name_constraints_test.go | 77 ++++++++++++++++++-- + src/crypto/x509/parser.go | 89 +++++++++++------------- + src/crypto/x509/parser_test.go | 82 +++++++++++++++------- + src/crypto/x509/verify.go | 53 ++++++++++---- + src/crypto/x509/verify_test.go | 2 +- + 5 files changed, 208 insertions(+), 95 deletions(-) + +diff --git a/src/crypto/x509/name_constraints_test.go b/src/crypto/x509/name_constraints_test.go +index e1c5f2a..afc1409 100644 +--- a/src/crypto/x509/name_constraints_test.go ++++ b/src/crypto/x509/name_constraints_test.go +@@ -1456,7 +1456,63 @@ var nameConstraintsTests = []nameConstraintsTest{ + expectedError: "incompatible key usage", + }, + +- // #77: if several EKUs are requested, satisfying any of them is sufficient. ++ // An invalid DNS SAN should be detected only at validation time so ++ // that we can process CA certificates in the wild that have invalid SANs. ++ // See https://github.com/golang/go/issues/23995 ++ ++ // #77: an invalid DNS or mail SAN will not be detected if name constraint ++ // checking is not triggered. ++ { ++ roots: make([]constraintsSpec, 1), ++ intermediates: [][]constraintsSpec{ ++ { ++ {}, ++ }, ++ }, ++ leaf: leafSpec{ ++ sans: []string{"dns:this is invalid", "email:this @ is invalid"}, ++ }, ++ }, ++ ++ // #78: an invalid DNS SAN will be detected if any name constraint checking ++ // is triggered. ++ { ++ roots: []constraintsSpec{ ++ { ++ bad: []string{"uri:"}, ++ }, ++ }, ++ intermediates: [][]constraintsSpec{ ++ { ++ {}, ++ }, ++ }, ++ leaf: leafSpec{ ++ sans: []string{"dns:this is invalid"}, ++ }, ++ expectedError: "cannot parse dnsName", ++ }, ++ ++ // #79: an invalid email SAN will be detected if any name constraint ++ // checking is triggered. ++ { ++ roots: []constraintsSpec{ ++ { ++ bad: []string{"uri:"}, ++ }, ++ }, ++ intermediates: [][]constraintsSpec{ ++ { ++ {}, ++ }, ++ }, ++ leaf: leafSpec{ ++ sans: []string{"email:this @ is invalid"}, ++ }, ++ expectedError: "cannot parse rfc822Name", ++ }, ++ ++ // #80: if several EKUs are requested, satisfying any of them is sufficient. + { + roots: make([]constraintsSpec, 1), + intermediates: [][]constraintsSpec{ +@@ -1471,7 +1527,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + requestedEKUs: []ExtKeyUsage{ExtKeyUsageClientAuth, ExtKeyUsageEmailProtection}, + }, + +- // #78: EKUs that are not asserted in VerifyOpts are not required to be ++ // #81: EKUs that are not asserted in VerifyOpts are not required to be + // nested. + { + roots: make([]constraintsSpec, 1), +@@ -1490,7 +1546,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #79: a certificate without SANs and CN is accepted in a constrained chain. ++ // #82: a certificate without SANs and CN is accepted in a constrained chain. + { + roots: []constraintsSpec{ + { +@@ -1507,7 +1563,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #80: a certificate without SANs and with a CN that does not parse as a ++ // #83: a certificate without SANs and with a CN that does not parse as a + // hostname is accepted in a constrained chain. + { + roots: []constraintsSpec{ +@@ -1526,7 +1582,7 @@ var nameConstraintsTests = []nameConstraintsTest{ + }, + }, + +- // #81: a certificate with SANs and CN is accepted in a constrained chain. ++ // #84: a certificate with SANs and CN is accepted in a constrained chain. + { + roots: []constraintsSpec{ + { +@@ -1543,7 +1599,16 @@ var nameConstraintsTests = []nameConstraintsTest{ + cn: "foo.bar", + }, + }, +- // #83: URIs with IPv6 addresses with zones and ports are rejected ++ ++ // #85: .example.com is an invalid DNS name, it should not match the ++ // constraint example.com. ++ { ++ roots: []constraintsSpec{{ok: []string{"dns:example.com"}}}, ++ leaf: leafSpec{sans: []string{"dns:.example.com"}}, ++ expectedError: "cannot parse dnsName \".example.com\"", ++ }, ++ ++ // #86: URIs with IPv6 addresses with zones and ports are rejected + { + roots: []constraintsSpec{ + { +diff --git a/src/crypto/x509/parser.go b/src/crypto/x509/parser.go +index c67fdd0..4c89dab 100644 +--- a/src/crypto/x509/parser.go ++++ b/src/crypto/x509/parser.go +@@ -370,56 +370,61 @@ func forEachSAN(der cryptobyte.String, callback func(tag int, data []byte) error + return nil + } + +-// domainNameValid checks the structure of a DNS name or similar name from a +-// certificate. If constraint is true, it checks additional properties required +-// for name constraints. +-// +-// This enforces the property that each label of a domain has a maximum length +-// of 63 characters, and so on. See +-// https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4. ++// domainNameValid is an alloc-less version of the checks that ++// domainToReverseLabels does. + func domainNameValid(s string, constraint bool) bool { ++ // TODO(#75835): This function omits a number of checks which we ++ // really should be doing to enforce that domain names are valid names per ++ // RFC 1034. We previously enabled these checks, but this broke a ++ // significant number of certificates we previously considered valid, and we ++ // happily create via CreateCertificate (et al). We should enable these ++ // checks, but will need to gate them behind a GODEBUG. ++ // ++ // I have left the checks we previously enabled, noted with "TODO(#75835)" so ++ // that we can easily re-enable them once we unbreak everyone. ++ ++ // TODO(#75835): this should only be true for constraints. + if len(s) == 0 { +- return false ++ return true + } + +- // There must not be a trailing period, although a trailing period during +- // matching is handled by trimming it in matchDomainConstraint and +- // matchHostnames. ++ // Do not allow trailing period (FQDN format is not allowed in SANs or ++ // constraints). + if s[len(s)-1] == '.' { + return false + } + +- // https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4 +- // 255 octets or less. +- if len(s) > 253 { +- return false ++ // TODO(#75835): domains must have at least one label, cannot have ++ // a leading empty label, and cannot be longer than 253 characters. ++ // if len(s) == 0 || (!constraint && s[0] == '.') || len(s) > 253 { ++ // return false ++ // } ++ ++ lastDot := -1 ++ if constraint && s[0] == '.' { ++ s = s[1:] + } + +- labelStart := 0 +- for i := 0; i < len(s); i++ { +- c := s[i] +- if c == '.' { +- labelLen := i - labelStart +- if labelLen == 0 { +- // Empty label, invalid unless this is the first character and +- // constraint is true, in which case it's used to match the +- // domain and all subdomains. +- if i != 0 || !constraint { +- return false +- } ++ for i := 0; i <= len(s); i++ { ++ if i < len(s) && (s[i] < 33 || s[i] > 126) { ++ // Invalid character. ++ return false ++ } ++ if i == len(s) || s[i] == '.' { ++ labelLen := i ++ if lastDot >= 0 { ++ labelLen -= lastDot + 1 + } +- // https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4 +- // labels 63 octets or less. +- if labelLen > 63 { ++ if labelLen == 0 { + return false + } +- labelStart = i + 1 ++ // TODO(#75835): labels cannot be longer than 63 characters. ++ // if labelLen > 63 { ++ // return false ++ // } ++ lastDot = i + } + } +- // Check the last label. +- if labelLen := len(s) - labelStart; labelLen == 0 || labelLen > 63 { +- return false +- } + + return true + } +@@ -432,18 +437,12 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string + if err := isIA5String(email); err != nil { + return errors.New("x509: SAN rfc822Name is malformed") + } +- if _, ok := parseRFC2821Mailbox(email); !ok { +- return fmt.Errorf("x509: cannot parse rfc822Name %q", email) +- } + emailAddresses = append(emailAddresses, email) + case nameTypeDNS: + name := string(data) + if err := isIA5String(name); err != nil { + return errors.New("x509: SAN dNSName is malformed") + } +- if !domainNameValid(name, false) { +- return fmt.Errorf("x509: cannot parse dnsName %q", name) +- } + dnsNames = append(dnsNames, string(name)) + case nameTypeURI: + uriStr := string(data) +@@ -454,12 +453,8 @@ func parseSANExtension(der cryptobyte.String) (dnsNames, emailAddresses []string + if err != nil { + return fmt.Errorf("x509: cannot parse URI %q: %s", uriStr, err) + } +- if len(uri.Host) > 0 { +- if _, _, err := net.SplitHostPort(uri.Host); err == nil { +- // Ignore the error: it's valid to have a host with a port. +- } else if !domainNameValid(uri.Host, false) && net.ParseIP(uri.Host) == nil { +- return fmt.Errorf("x509: cannot parse URI %q: invalid domain", uriStr) +- } ++ if len(uri.Host) > 0 && !domainNameValid(uri.Host, false) { ++ return fmt.Errorf("x509: cannot parse URI %q: invalid domain", uriStr) + } + uris = append(uris, uri) + case nameTypeIP: +diff --git a/src/crypto/x509/parser_test.go b/src/crypto/x509/parser_test.go +index ede5235..d322d59 100644 +--- a/src/crypto/x509/parser_test.go ++++ b/src/crypto/x509/parser_test.go +@@ -104,37 +104,67 @@ func TestParseASN1String(t *testing.T) { + } + + func TestDomainNameValid(t *testing.T) { +- tests := []struct { ++ for _, tc := range []struct { + name string +- domain string ++ dnsName string + constraint bool +- want bool ++ valid bool + }{ +- {"empty string", "", false, false}, +- {"valid domain", "example.com", false, true}, +- {"valid subdomain", "sub.example.com", false, true}, +- {"trailing period", "example.com.", false, false}, +- {"leading period non-constraint", ".example.com", false, false}, +- {"leading period constraint", ".example.com", true, true}, +- {"double period", "example..com", false, false}, +- {"too long", strings.Repeat("a", 254), false, false}, +- {"exactly 253 chars", strings.Repeat("a", 240) + ".example.com", false, true}, +- {"label too long", strings.Repeat("a", 64) + ".example.com", false, false}, +- {"label exactly 63 chars", strings.Repeat("a", 63) + ".example.com", false, true}, +- {"single label", "localhost", false, true}, +- {"only period non-constraint", ".", false, false}, +- {"only period constraint", ".", true, false}, +- {"multiple labels", "a.b.c.d.e.f.g", false, true}, +- {"empty label at start", ".example", false, false}, +- {"empty label at end", "example.", false, false}, +- {"hyphen at start", "-example.com", false, true}, +- } ++ // TODO(#75835): these tests are for stricter name validation, which we ++ // had to disable. Once we reenable these strict checks, behind a ++ // GODEBUG, we should add them back in. ++ // {"empty name, name", "", false, false}, ++ // {"254 char label, name", strings.Repeat("a.a", 84) + "aaa", false, false}, ++ // {"254 char label, constraint", strings.Repeat("a.a", 84) + "aaa", true, false}, ++ // {"253 char label, name", strings.Repeat("a.a", 84) + "aa", false, false}, ++ // {"253 char label, constraint", strings.Repeat("a.a", 84) + "aa", true, false}, ++ // {"64 char single label, name", strings.Repeat("a", 64), false, false}, ++ // {"64 char single label, constraint", strings.Repeat("a", 64), true, false}, ++ // {"64 char label, name", "a." + strings.Repeat("a", 64), false, false}, ++ // {"64 char label, constraint", "a." + strings.Repeat("a", 64), true, false}, ++ ++ // TODO(#75835): these are the inverse of the tests above, they should be removed ++ // once the strict checking is enabled. ++ {"254 char label, name", strings.Repeat("a.a", 84) + "aaa", false, true}, ++ {"254 char label, constraint", strings.Repeat("a.a", 84) + "aaa", true, true}, ++ {"253 char label, name", strings.Repeat("a.a", 84) + "aa", false, true}, ++ {"253 char label, constraint", strings.Repeat("a.a", 84) + "aa", true, true}, ++ {"64 char single label, name", strings.Repeat("a", 64), false, true}, ++ {"64 char single label, constraint", strings.Repeat("a", 64), true, true}, ++ {"64 char label, name", "a." + strings.Repeat("a", 64), false, true}, ++ {"64 char label, constraint", "a." + strings.Repeat("a", 64), true, true}, + +- for _, tt := range tests { +- t.Run(tt.name, func(t *testing.T) { +- if got := domainNameValid(tt.domain, tt.constraint); got != tt.want { +- t.Errorf("domainNameValid(%q, %v) = %v, want %v", tt.domain, tt.constraint, got, tt.want) ++ // Check we properly enforce properties of domain names. ++ {"empty name, constraint", "", true, true}, ++ {"empty label, name", "a..a", false, false}, ++ {"empty label, constraint", "a..a", true, false}, ++ {"period, name", ".", false, false}, ++ {"period, constraint", ".", true, false}, // TODO(roland): not entirely clear if this is a valid constraint (require at least one label?) ++ {"valid, name", "a.b.c", false, true}, ++ {"valid, constraint", "a.b.c", true, true}, ++ {"leading period, name", ".a.b.c", false, false}, ++ {"leading period, constraint", ".a.b.c", true, true}, ++ {"trailing period, name", "a.", false, false}, ++ {"trailing period, constraint", "a.", true, false}, ++ {"bare label, name", "a", false, true}, ++ {"bare label, constraint", "a", true, true}, ++ {"63 char single label, name", strings.Repeat("a", 63), false, true}, ++ {"63 char single label, constraint", strings.Repeat("a", 63), true, true}, ++ {"63 char label, name", "a." + strings.Repeat("a", 63), false, true}, ++ {"63 char label, constraint", "a." + strings.Repeat("a", 63), true, true}, ++ } { ++ t.Run(tc.name, func(t *testing.T) { ++ valid := domainNameValid(tc.dnsName, tc.constraint) ++ if tc.valid != valid { ++ t.Errorf("domainNameValid(%q, %t) = %v; want %v", tc.dnsName, tc.constraint, !tc.valid, tc.valid) + } + }) + } + } ++ ++func FuzzDomainNameValid(f *testing.F) { ++ f.Fuzz(func(t *testing.T, data string) { ++ domainNameValid(data, false) ++ domainNameValid(data, true) ++ }) ++} +diff --git a/src/crypto/x509/verify.go b/src/crypto/x509/verify.go +index 237cfeb..028c4a7 100644 +--- a/src/crypto/x509/verify.go ++++ b/src/crypto/x509/verify.go +@@ -393,7 +393,7 @@ func domainToReverseLabels(domain string) (reverseLabels []string, ok bool) { + return reverseLabels, true + } + +-func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string) (bool, error) { ++func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) { + // If the constraint contains an @, then it specifies an exact mailbox + // name. + if strings.Contains(constraint, "@") { +@@ -406,10 +406,10 @@ func matchEmailConstraint(mailbox rfc2821Mailbox, constraint string) (bool, erro + + // Otherwise the constraint is like a DNS constraint of the domain part + // of the mailbox. +- return matchDomainConstraint(mailbox.domain, constraint) ++ return matchDomainConstraint(mailbox.domain, constraint, reversedDomainsCache, reversedConstraintsCache) + } + +-func matchURIConstraint(uri *url.URL, constraint string) (bool, error) { ++func matchURIConstraint(uri *url.URL, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) { + // From RFC 5280, Section 4.2.1.10: + // “a uniformResourceIdentifier that does not include an authority + // component with a host name specified as a fully qualified domain +@@ -438,7 +438,7 @@ func matchURIConstraint(uri *url.URL, constraint string) (bool, error) { + return false, fmt.Errorf("URI with IP (%q) cannot be matched against constraints", uri.String()) + } + +- return matchDomainConstraint(host, constraint) ++ return matchDomainConstraint(host, constraint, reversedDomainsCache, reversedConstraintsCache) + } + + func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) { +@@ -455,16 +455,21 @@ func matchIPConstraint(ip net.IP, constraint *net.IPNet) (bool, error) { + return true, nil + } + +-func matchDomainConstraint(domain, constraint string) (bool, error) { ++func matchDomainConstraint(domain, constraint string, reversedDomainsCache map[string][]string, reversedConstraintsCache map[string][]string) (bool, error) { + // The meaning of zero length constraints is not specified, but this + // code follows NSS and accepts them as matching everything. + if len(constraint) == 0 { + return true, nil + } + +- domainLabels, ok := domainToReverseLabels(domain) +- if !ok { +- return false, fmt.Errorf("x509: internal error: cannot parse domain %q", domain) ++ domainLabels, found := reversedDomainsCache[domain] ++ if !found { ++ var ok bool ++ domainLabels, ok = domainToReverseLabels(domain) ++ if !ok { ++ return false, fmt.Errorf("x509: internal error: cannot parse domain %q", domain) ++ } ++ reversedDomainsCache[domain] = domainLabels + } + + // RFC 5280 says that a leading period in a domain name means that at +@@ -478,9 +483,14 @@ func matchDomainConstraint(domain, constraint string) (bool, error) { + constraint = constraint[1:] + } + +- constraintLabels, ok := domainToReverseLabels(constraint) +- if !ok { +- return false, fmt.Errorf("x509: internal error: cannot parse domain %q", constraint) ++ constraintLabels, found := reversedConstraintsCache[constraint] ++ if !found { ++ var ok bool ++ constraintLabels, ok = domainToReverseLabels(constraint) ++ if !ok { ++ return false, fmt.Errorf("x509: internal error: cannot parse domain %q", constraint) ++ } ++ reversedConstraintsCache[constraint] = constraintLabels + } + + if len(domainLabels) < len(constraintLabels) || +@@ -601,6 +611,19 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V + } + } + ++ // Each time we do constraint checking, we need to check the constraints in ++ // the current certificate against all of the names that preceded it. We ++ // reverse these names using domainToReverseLabels, which is a relatively ++ // expensive operation. Since we check each name against each constraint, ++ // this requires us to do N*C calls to domainToReverseLabels (where N is the ++ // total number of names that preceed the certificate, and C is the total ++ // number of constraints in the certificate). By caching the results of ++ // calling domainToReverseLabels, we can reduce that to N+C calls at the ++ // cost of keeping all of the parsed names and constraints in memory until ++ // we return from isValid. ++ reversedDomainsCache := map[string][]string{} ++ reversedConstraintsCache := map[string][]string{} ++ + if (certType == intermediateCertificate || certType == rootCertificate) && + c.hasNameConstraints() { + toCheck := []*Certificate{} +@@ -621,20 +644,20 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V + + if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "email address", name, mailbox, + func(parsedName, constraint any) (bool, error) { +- return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string)) ++ return matchEmailConstraint(parsedName.(rfc2821Mailbox), constraint.(string), reversedDomainsCache, reversedConstraintsCache) + }, c.PermittedEmailAddresses, c.ExcludedEmailAddresses); err != nil { + return err + } + + case nameTypeDNS: + name := string(data) +- if _, ok := domainToReverseLabels(name); !ok { ++ if !domainNameValid(name, false) { + return fmt.Errorf("x509: cannot parse dnsName %q", name) + } + + if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "DNS name", name, name, + func(parsedName, constraint any) (bool, error) { +- return matchDomainConstraint(parsedName.(string), constraint.(string)) ++ return matchDomainConstraint(parsedName.(string), constraint.(string), reversedDomainsCache, reversedConstraintsCache) + }, c.PermittedDNSDomains, c.ExcludedDNSDomains); err != nil { + return err + } +@@ -648,7 +671,7 @@ func (c *Certificate) isValid(certType int, currentChain []*Certificate, opts *V + + if err := c.checkNameConstraints(&comparisonCount, maxConstraintComparisons, "URI", name, uri, + func(parsedName, constraint any) (bool, error) { +- return matchURIConstraint(parsedName.(*url.URL), constraint.(string)) ++ return matchURIConstraint(parsedName.(*url.URL), constraint.(string), reversedDomainsCache, reversedConstraintsCache) + }, c.PermittedURIDomains, c.ExcludedURIDomains); err != nil { + return err + } +diff --git a/src/crypto/x509/verify_test.go b/src/crypto/x509/verify_test.go +index a003422..9480059 100644 +--- a/src/crypto/x509/verify_test.go ++++ b/src/crypto/x509/verify_test.go +@@ -1547,7 +1547,7 @@ var nameConstraintTests = []struct { + + func TestNameConstraints(t *testing.T) { + for i, test := range nameConstraintTests { +- result, err := matchDomainConstraint(test.domain, test.constraint) ++ result, err := matchDomainConstraint(test.domain, test.constraint, map[string][]string{}, map[string][]string{}) + + if err != nil && !test.expectError { + t.Errorf("unexpected error for test #%d: domain=%s, constraint=%s, err=%s", i, test.domain, test.constraint, err) +-- +2.33.0 diff --git a/backport-0044-CVE-2025-61723-encoding-pem-make-Decode-complexity-linear.patch b/backport-0044-CVE-2025-61723-encoding-pem-make-Decode-complexity-linear.patch new file mode 100644 index 0000000..254619d --- /dev/null +++ b/backport-0044-CVE-2025-61723-encoding-pem-make-Decode-complexity-linear.patch @@ -0,0 +1,220 @@ +From 5ce8cd16f3859ec5ac4106ad8ec15d6236f4501b Mon Sep 17 00:00:00 2001 +From: Roland Shoemaker +Date: Tue, 30 Sep 2025 11:16:56 -0700 +Subject: [PATCH] encoding/pem: make Decode complexity linear + +Because Decode scanned the input first for the first BEGIN line, and +then the first END line, the complexity of Decode is quadratic. If the +input contained a large number of BEGINs and then a single END right at +the end of the input, we would find the first BEGIN, and then scan the +entire input for the END, and fail to parse the block, so move onto the +next BEGIN, scan the entire input for the END, etc. + +Instead, look for the first END in the input, and then the first BEGIN +that precedes the found END. We then process the bytes between the BEGIN +and END, and move onto the bytes after the END for further processing. +This gives us linear complexity. + +Fixes CVE-2025-61723 +Fixes #75676 + +Change-Id: I813c4f63e78bca4054226c53e13865c781564ccf +Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2921 +Reviewed-by: Nicholas Husin +Reviewed-by: Damien Neil +Reviewed-on: https://go-review.googlesource.com/c/go/+/709858 +TryBot-Bypass: Michael Pratt +Auto-Submit: Michael Pratt +Reviewed-by: Carlos Amedee + +Backported-by: zhaoyifan +Reference: https://go-review.googlesource.com/c/go/+/709858 +Conflict: no +--- + src/encoding/pem/pem.go | 67 ++++++++++++++++++++---------------- + src/encoding/pem/pem_test.go | 13 +++---- + 2 files changed, 44 insertions(+), 36 deletions(-) + +diff --git a/src/encoding/pem/pem.go b/src/encoding/pem/pem.go +index d26e4c8..610bd42 100644 +--- a/src/encoding/pem/pem.go ++++ b/src/encoding/pem/pem.go +@@ -37,7 +37,7 @@ type Block struct { + // line bytes. The remainder of the byte array (also not including the new line + // bytes) is also returned and this will always be smaller than the original + // argument. +-func getLine(data []byte) (line, rest []byte) { ++func getLine(data []byte) (line, rest []byte, consumed int) { + i := bytes.IndexByte(data, '\n') + var j int + if i < 0 { +@@ -49,7 +49,7 @@ func getLine(data []byte) (line, rest []byte) { + i-- + } + } +- return bytes.TrimRight(data[0:i], " \t"), data[j:] ++ return bytes.TrimRight(data[0:i], " \t"), data[j:], j + } + + // removeSpacesAndTabs returns a copy of its input with all spaces and tabs +@@ -90,20 +90,32 @@ func Decode(data []byte) (p *Block, rest []byte) { + // pemStart begins with a newline. However, at the very beginning of + // the byte array, we'll accept the start string without it. + rest = data ++ + for { +- if bytes.HasPrefix(rest, pemStart[1:]) { +- rest = rest[len(pemStart)-1:] +- } else if _, after, ok := bytes.Cut(rest, pemStart); ok { +- rest = after +- } else { ++ // Find the first END line, and then find the last BEGIN line before ++ // the end line. This lets us skip any repeated BEGIN lines that don't ++ // have a matching END. ++ endIndex := bytes.Index(rest, pemEnd) ++ if endIndex < 0 { ++ return nil, data ++ } ++ endTrailerIndex := endIndex + len(pemEnd) ++ beginIndex := bytes.LastIndex(rest[:endIndex], pemStart[1:]) ++ if beginIndex < 0 || beginIndex > 0 && rest[beginIndex-1] != '\n' { + return nil, data + } ++ rest = rest[beginIndex+len(pemStart)-1:] ++ endIndex -= beginIndex + len(pemStart) - 1 ++ endTrailerIndex -= beginIndex + len(pemStart) - 1 + + var typeLine []byte +- typeLine, rest = getLine(rest) ++ var consumed int ++ typeLine, rest, consumed = getLine(rest) + if !bytes.HasSuffix(typeLine, pemEndOfLine) { + continue + } ++ endIndex -= consumed ++ endTrailerIndex -= consumed + typeLine = typeLine[0 : len(typeLine)-len(pemEndOfLine)] + + p = &Block{ +@@ -117,7 +129,7 @@ func Decode(data []byte) (p *Block, rest []byte) { + if len(rest) == 0 { + return nil, data + } +- line, next := getLine(rest) ++ line, next, consumed := getLine(rest) + + key, val, ok := bytes.Cut(line, colon) + if !ok { +@@ -129,21 +141,13 @@ func Decode(data []byte) (p *Block, rest []byte) { + val = bytes.TrimSpace(val) + p.Headers[string(key)] = string(val) + rest = next ++ endIndex -= consumed ++ endTrailerIndex -= consumed + } + +- var endIndex, endTrailerIndex int +- +- // If there were no headers, the END line might occur +- // immediately, without a leading newline. +- if len(p.Headers) == 0 && bytes.HasPrefix(rest, pemEnd[1:]) { +- endIndex = 0 +- endTrailerIndex = len(pemEnd) - 1 +- } else { +- endIndex = bytes.Index(rest, pemEnd) +- endTrailerIndex = endIndex + len(pemEnd) +- } +- +- if endIndex < 0 { ++ // If there were headers, there must be a newline between the headers ++ // and the END line, so endIndex should be >= 0. ++ if len(p.Headers) > 0 && endIndex < 0 { + continue + } + +@@ -163,21 +167,24 @@ func Decode(data []byte) (p *Block, rest []byte) { + } + + // The line must end with only whitespace. +- if s, _ := getLine(restOfEndLine); len(s) != 0 { ++ if s, _, _ := getLine(restOfEndLine); len(s) != 0 { + continue + } + +- base64Data := removeSpacesAndTabs(rest[:endIndex]) +- p.Bytes = make([]byte, base64.StdEncoding.DecodedLen(len(base64Data))) +- n, err := base64.StdEncoding.Decode(p.Bytes, base64Data) +- if err != nil { +- continue ++ p.Bytes = []byte{} ++ if endIndex > 0 { ++ base64Data := removeSpacesAndTabs(rest[:endIndex]) ++ p.Bytes = make([]byte, base64.StdEncoding.DecodedLen(len(base64Data))) ++ n, err := base64.StdEncoding.Decode(p.Bytes, base64Data) ++ if err != nil { ++ continue ++ } ++ p.Bytes = p.Bytes[:n] + } +- p.Bytes = p.Bytes[:n] + + // the -1 is because we might have only matched pemEnd without the + // leading newline if the PEM block was empty. +- _, rest = getLine(rest[endIndex+len(pemEnd)-1:]) ++ _, rest, _ = getLine(rest[endIndex+len(pemEnd)-1:]) + return p, rest + } + } +diff --git a/src/encoding/pem/pem_test.go b/src/encoding/pem/pem_test.go +index 56a7754..7025277 100644 +--- a/src/encoding/pem/pem_test.go ++++ b/src/encoding/pem/pem_test.go +@@ -34,7 +34,7 @@ var getLineTests = []GetLineTest{ + + func TestGetLine(t *testing.T) { + for i, test := range getLineTests { +- x, y := getLine([]byte(test.in)) ++ x, y, _ := getLine([]byte(test.in)) + if string(x) != test.out1 || string(y) != test.out2 { + t.Errorf("#%d got:%+v,%+v want:%s,%s", i, x, y, test.out1, test.out2) + } +@@ -46,6 +46,7 @@ func TestDecode(t *testing.T) { + if !reflect.DeepEqual(result, certificate) { + t.Errorf("#0 got:%#v want:%#v", result, certificate) + } ++ + result, remainder = Decode(remainder) + if !reflect.DeepEqual(result, privateKey) { + t.Errorf("#1 got:%#v want:%#v", result, privateKey) +@@ -68,7 +69,7 @@ func TestDecode(t *testing.T) { + } + + result, remainder = Decode(remainder) +- if result == nil || result.Type != "HEADERS" || len(result.Headers) != 1 { ++ if result == nil || result.Type != "VALID HEADERS" || len(result.Headers) != 1 { + t.Errorf("#5 expected single header block but got :%v", result) + } + +@@ -381,15 +382,15 @@ ZWAaUoVtWIQ52aKS0p19G99hhb+IVANC4akkdHV4SP8i7MVNZhfUmg== + + # This shouldn't be recognised because of the missing newline after the + headers. +------BEGIN HEADERS----- ++-----BEGIN INVALID HEADERS----- + Header: 1 +------END HEADERS----- ++-----END INVALID HEADERS----- + + # This should be valid, however. +------BEGIN HEADERS----- ++-----BEGIN VALID HEADERS----- + Header: 1 + +------END HEADERS-----`) ++-----END VALID HEADERS-----`) + + var certificate = &Block{Type: "CERTIFICATE", + Headers: map[string]string{}, +-- +2.33.0 + diff --git a/golang.spec b/golang.spec index 31b0b90..f7116e8 100644 --- a/golang.spec +++ b/golang.spec @@ -66,7 +66,7 @@ Name: golang Version: 1.21.4 -Release: 38 +Release: 39 Summary: The Go Programming Language License: BSD and Public Domain URL: https://golang.org/ @@ -161,6 +161,9 @@ Patch6038: backport-0038-CVE-2025-58189-crypto-tls-quote-protocols-in.patch Patch6039: backport-0039-CVE-2025-61724-net-textproto-avoid-quadratic.patch Patch6040: backport-0040-CVE-2025-58188-crypto-x509-mitigate-Dos-vector.patch Patch6041: backport-0041-CVE-2025-58185-encoding-asn1-prevent-memory-exhaustion.patch +Patch6042: backport-0042-CVE-2025-58187-crypto-x509-improve-domain-name-verification.patch +Patch6043: backport-0043-CVE-2025-58187-crypto-x509-rework-fix-for-CVE-2025-58187.patch +Patch6044: backport-0044-CVE-2025-61723-encoding-pem-make-Decode-complexity-linear.patch # Part 8001 ~ 8999 # Developed optimization features @@ -406,6 +409,12 @@ fi %files devel -f go-tests.list -f go-misc.list -f go-src.list %changelog +* Fri Nov 14 2025 zhaoyifan - 1.21.4-39 +- Type:CVE +- CVE:CVE-2025-58187,CVE-2025-61723 +- SUG:NA +- DESC:fix CVE-2025-58187,CVE-2025-61723 + * Sat Nov 8 2025 huzhangying - 1.21.4-38 - Type:CVE - CVE:CVE-2025-58183,CVE-2025-58185, CVE-2025-58188, CVE-2025-58189, CVE-2025-61724 -- Gitee