Skip to content

Commit

Permalink
build(deps): bump wasmtime-go to v3 (#5422)
Browse files Browse the repository at this point in the history
Release notes for Wasmtime 3.0.0:
https://github.com/bytecodealliance/wasmtime/blob/main/RELEASES.md#300

But we're also now getting a bunch of CVE fixes, which is the real reason for
updating this dependency:

CVE-2022-39392 - modules may perform out-of-bounds reads/writes when the pooling allocator was configured with memory_pages: 0.

CVE-2022-39393 - data can be leaked between instances when using the pooling allocator.

CVE-2022-39394 - An incorrect Rust signature for the C API wasmtime_trap_code function could lead to an out-of-bounds write of three zero bytes.

We're not using their allocator, but the last one could have been a problem for us, too.
I've never seen it happen in the wild, but it's definitely a code path that we're using.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
  • Loading branch information
srenatus committed Nov 30, 2022
1 parent 9354f89 commit 6798ec7
Show file tree
Hide file tree
Showing 73 changed files with 89 additions and 940 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -6,7 +6,7 @@ require (
github.com/OneOfOne/xxhash v1.2.8
github.com/agnivade/levenshtein v1.1.1
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
github.com/bytecodealliance/wasmtime-go v1.0.0
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2
github.com/containerd/containerd v1.6.10
github.com/dgraph-io/badger/v3 v3.2103.4
github.com/fortytw2/leaktest v1.3.0
Expand Down
886 changes: 2 additions & 884 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/wasm/sdk/internal/wasm/bindings.go
Expand Up @@ -16,7 +16,7 @@ import (
"strconv"
"time"

"github.com/bytecodealliance/wasmtime-go"
wasmtime "github.com/bytecodealliance/wasmtime-go/v3"

"github.com/open-policy-agent/opa/ast"
"github.com/open-policy-agent/opa/metrics"
Expand Down
2 changes: 1 addition & 1 deletion internal/wasm/sdk/internal/wasm/pool.go
Expand Up @@ -9,7 +9,7 @@ import (
"context"
"sync"

"github.com/bytecodealliance/wasmtime-go"
wasmtime "github.com/bytecodealliance/wasmtime-go/v3"

"github.com/open-policy-agent/opa/internal/wasm/sdk/opa/errors"
"github.com/open-policy-agent/opa/internal/wasm/util"
Expand Down
2 changes: 1 addition & 1 deletion internal/wasm/sdk/internal/wasm/vm.go
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"time"

"github.com/bytecodealliance/wasmtime-go"
wasmtime "github.com/bytecodealliance/wasmtime-go/v3"

"github.com/open-policy-agent/opa/ast"
sdk_errors "github.com/open-policy-agent/opa/internal/wasm/sdk/opa/errors"
Expand Down
22 changes: 0 additions & 22 deletions vendor/github.com/bytecodealliance/wasmtime-go/includebuild.go

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6798ec7

Please sign in to comment.