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

Backport of security: Upgrade go version to 1.22.12 into release/1.20.x #22133

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/22132.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:security
Upgrade Go to use v1.22.12 and bump Go X-Repositories to latest. This addresses CVE
[CVE-2025-22866](https://nvd.nist.gov/vuln/detail/CVE-2025-22866)
```
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.11
1.22.12
4 changes: 2 additions & 2 deletions agent/consul/state/txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (s *Store) txnKVS(tx WriteTxn, idx uint64, op *structs.TxnKVOp) (structs.Tx
var entry *structs.DirEntry
var err error

// enumcover: api.KVOp
// enumcover:api.KVOp
switch op.Verb {
case api.KVSet:
entry = &op.DirEnt
Expand Down Expand Up @@ -137,7 +137,7 @@ func (s *Store) txnKVS(tx WriteTxn, idx uint64, op *structs.TxnKVOp) (structs.Tx
func txnSession(tx WriteTxn, idx uint64, op *structs.TxnSessionOp) error {
var err error

// enumcover: api.SessionOp
// enumcover:api.SessionOp
switch op.Verb {
case api.SessionDelete:
err = sessionDeleteWithSession(tx, &op.Session, idx)
Expand Down
10 changes: 5 additions & 5 deletions agent/consul/txn_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (t *Txn) Read(args *structs.TxnReadRequest, reply *structs.TxnReadResponse)
// nodeVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func nodeVerbValidate(op api.NodeOp) (bool, error) {
// enumcover: api.NodeOp
// enumcover:api.NodeOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.NodeGet:
Expand All @@ -283,7 +283,7 @@ func nodeVerbValidate(op api.NodeOp) (bool, error) {
// serviceVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func serviceVerbValidate(op api.ServiceOp) (bool, error) {
// enumcover: api.ServiceOp
// enumcover:api.ServiceOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.ServiceGet:
Expand All @@ -298,7 +298,7 @@ func serviceVerbValidate(op api.ServiceOp) (bool, error) {
// checkVerbValidate checks for a known operation type. For certain operations,
// it also indicated if further "preApply" checks are required.
func checkVerbValidate(op api.CheckOp) (bool, error) {
// enumcover: api.CheckOp
// enumcover:api.CheckOp
switch op {
// Skip the pre-apply checks if this is a GET.
case api.CheckGet:
Expand All @@ -312,7 +312,7 @@ func checkVerbValidate(op api.CheckOp) (bool, error) {

// intentionVerbValidate checks for a known operation type.
func intentionVerbValidate(op structs.IntentionOp) error {
// enumcover: structs.IntentionOp
// enumcover:structs.IntentionOp
switch op {
case structs.IntentionOpCreate, structs.IntentionOpDelete, structs.IntentionOpUpdate, structs.IntentionOpDeleteAll, structs.IntentionOpUpsert:
return nil
Expand All @@ -323,7 +323,7 @@ func intentionVerbValidate(op structs.IntentionOp) error {

// sessionVerbValidate checks for a known operation type.
func sessionVerbValidate(op api.SessionOp) error {
// enumcover: api.SessionOp
// enumcover:api.SessionOp
switch op {
case api.SessionDelete:
return nil
Expand Down
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/api

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul/sdk => ../sdk

Expand Down
2 changes: 1 addition & 1 deletion envoyextensions/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/envoyextensions

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ../api
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ./api
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/e2e/consul/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/hashicorp/consul

go 1.22.11
go 1.22.12

require google.golang.org/protobuf v1.28.1
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/proto-gen-rpc-glue/e2e

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul => ./consul

Expand Down
2 changes: 1 addition & 1 deletion internal/tools/proto-gen-rpc-glue/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/proto-gen-rpc-glue

go 1.22.11
go 1.22.12

require github.com/stretchr/testify v1.8.4

Expand Down
2 changes: 1 addition & 1 deletion internal/tools/protoc-gen-consul-rate-limit/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/internal/tools/protoc-gen-consul-rate-limit

go 1.22.11
go 1.22.12

replace github.com/hashicorp/consul/proto-public => ../../../proto-public

Expand Down
2 changes: 1 addition & 1 deletion proto-public/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/proto-public

go 1.22.11
go 1.22.12

require (
google.golang.org/grpc v1.56.3
Expand Down
2 changes: 1 addition & 1 deletion sdk/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/sdk

go 1.22.11
go 1.22.12

require (
github.com/hashicorp/go-cleanhttp v0.5.2
Expand Down
2 changes: 1 addition & 1 deletion test-integ/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/test-integ

go 1.22.11
go 1.22.12

require (
github.com/google/go-cmp v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion test/integration/connect/envoy/test-sds-server/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test-sds-server

go 1.22.11
go 1.22.12

require (
github.com/envoyproxy/go-control-plane v0.12.0
Expand Down
2 changes: 1 addition & 1 deletion test/integration/consul-container/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/test/integration/consul-container

go 1.22.11
go 1.22.12

require (
fortio.org/fortio v1.54.0
Expand Down
2 changes: 1 addition & 1 deletion testing/deployer/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/testing/deployer

go 1.22.11
go 1.22.12

require (
github.com/avast/retry-go v3.0.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion troubleshoot/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hashicorp/consul/troubleshoot

go 1.22.11
go 1.22.12

replace (
github.com/hashicorp/consul/api => ../api
Expand Down
Loading