go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
904 stars 148 forks source link

wasm: fix arbitrary memory allocation attack #148

Closed laizy closed 5 years ago

laizy commented 5 years ago

fix #147

laizy commented 5 years ago

@sbinet, review?

codecov-io commented 5 years ago

Codecov Report

Merging #148 into master will increase coverage by 0.13%. The diff coverage is 63.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #148      +/-   ##
==========================================
+ Coverage   69.47%   69.61%   +0.13%     
==========================================
  Files          43       43              
  Lines        4921     4959      +38     
==========================================
+ Hits         3419     3452      +33     
- Misses       1217     1222       +5     
  Partials      285      285
Impacted Files Coverage Δ
wasm/section.go 54.87% <50%> (+1.22%) :arrow_up:
wasm/types.go 48.12% <80%> (+0.65%) :arrow_up:
wasm/read.go 72.5% <92.3%> (+8.86%) :arrow_up:
wasm/internal/readpos/readpos.go 44.44% <0%> (-5.56%) :arrow_down:
wasm/module.go 72.88% <0%> (-1.7%) :arrow_down:
exec/vm.go 83.27% <0%> (-0.6%) :arrow_down:
wasm/index.go 58.09% <0%> (+1.9%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0864b86...39c1d72. Read the comment docs.