CVE-2022-39392: Wasmtime out of bounds read/write with zero-memory-pages configuration
(updated )
There is a bug in Wasmtime’s implementation of its pooling instance allocator when the allocator is configured to give WebAssembly instances a maximum of zero pages of memory. In this configuration the virtual memory mapping for WebAssembly memories did not meet the compiler-required configuration requirements for safely executing WebAssembly modules. Wasmtime’s default settings require virtual memory page faults to indicate that wasm reads/writes are out-of-bounds, but the pooling allocator’s configuration would not create an appropriate virtual memory mapping for this meaning out of bounds reads/writes can successfully read/write memory unrelated to the wasm sandbox within range of the base address of the memory mapping created by the pooling allocator.
References
- github.com/advisories/GHSA-44mr-8vmm-wjhg
- github.com/bytecodealliance/wasmtime
- github.com/bytecodealliance/wasmtime/commit/e60c3742904ccbb3e26da201c9221c38a4981d72
- github.com/bytecodealliance/wasmtime/security/advisories/GHSA-44mr-8vmm-wjhg
- groups.google.com/a/bytecodealliance.org/g/sec-announce/c/c1HBDDJwNPA
- nvd.nist.gov/vuln/detail/CVE-2022-39392
- rustsec.org/advisories/RUSTSEC-2022-0076.html
- rustsec.org/advisories/RUSTSEC-2022-0102.html
Code Behaviors & Features
Detect and mitigate CVE-2022-39392 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →