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

Bump go toolchain version to address CVE-2023-45288 for release-1.3 #713

Merged
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
1 change: 0 additions & 1 deletion .github/workflows/failpoint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
- run: |
make gofail-enable
make test-failpoint

1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,3 @@ jobs:
with:
go-version: ${{ steps.goversion.outputs.goversion }}
- run: make coverage

2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.13
1.21.9
7 changes: 0 additions & 7 deletions cmd/bbolt/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main_test
import (
"bytes"
crypto "crypto/rand"
"encoding/binary"
"fmt"
"io"
"math/rand"
Expand Down Expand Up @@ -304,12 +303,6 @@ func NewMain() *Main {
}

func TestCompactCommand_Run(t *testing.T) {
var s int64
if err := binary.Read(crypto.Reader, binary.BigEndian, &s); err != nil {
t.Fatal(err)
}
rand.Seed(s)
henrybear327 marked this conversation as resolved.
Show resolved Hide resolved

dstdb := btesting.MustCreateDB(t)
dstdb.Close()

Expand Down
1 change: 0 additions & 1 deletion freelist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ func benchmark_FreelistRelease(b *testing.B, size int) {
}

func randomPgids(n int) []pgid {
rand.Seed(42)
pgids := make(pgids, n)
for i := range pgids {
pgids[i] = pgid(rand.Int63())
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module go.etcd.io/bbolt

go 1.17
go 1.21

require (
github.com/stretchr/testify v1.8.1
go.etcd.io/gofail v0.1.0
golang.org/x/sync v0.5.0
golang.org/x/sys v0.4.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sync v0.5.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
6 changes: 4 additions & 2 deletions manydbs_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package bbolt

import (
"crypto/rand"
"fmt"
"math/rand"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -46,7 +46,9 @@ func createAndPutKeys(t *testing.T) {
}

var key [16]byte
rand.Read(key[:])
if _, err := rand.Read(key[:]); err != nil {
return err
}
if err := nodes.Put(key[:], nil); err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions simulation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ func testSimulate(t *testing.T, openOption *bolt.Options, round, threadCount, pa
t.Skip("skipping test in short mode.")
}

rand.Seed(int64(qseed))

// A list of operations that readers and writers can perform.
var readerHandlers = []simulateHandler{simulateGetHandler}
var writerHandlers = []simulateHandler{simulateGetHandler, simulatePutHandler}
Expand Down
2 changes: 1 addition & 1 deletion unsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
// manipulation of reflect.SliceHeader to prevent misuse, namely, converting
// from reflect.SliceHeader to a Go slice type.
func unsafeSlice(slice, data unsafe.Pointer, len int) {
s := (*reflect.SliceHeader)(slice)
s := (*reflect.SliceHeader)(slice) //nolint:staticcheck
henrybear327 marked this conversation as resolved.
Show resolved Hide resolved
s.Data = uintptr(data)
s.Cap = len
s.Len = len
Expand Down
Loading