Advisory

GO-2022-0247

Also known as: BIT-golang-2021-38297, CVE-2021-38297

Summary

Buffer overflow in WASM modules in misc/wasm and cmd/link

Details

When invoking functions from WASM modules, built using GOARCH=wasm GOOS=js, passing very large arguments can cause portions of the module to be overwritten with data from the arguments due to a buffer overflow error.

If using wasm_exec.js to execute WASM modules, users will need to replace their copy (as described in https://golang.org/wiki/WebAssembly#getting-started) after rebuilding any modules.

Severity

Not rated by the source.

Dates

Published
2022-05-24 20:14 UTC
Modified
2024-05-20 16:03 UTC

Affected packages and fixes

toolchain

Go · All systems

Affected

  • introduced 0, fixed 1.16.9, introduced 1.17.0-0, fixed 1.17.2 (semver)

Fixed versions

1.16.9, 1.17.2

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences