ladybird/Libraries/LibWasm/AbstractMachine
François Guerraz be4173af81 LibWasm: Validate a tag's type index before dereferencing it
The throw and try_table validators looked up the tag referenced by the
instruction, then indexed m_context.types with the tag's type index
without checking it was in range. validate(TagIndex) only validates the
tag index itself, and the tag section is validated after the code
section, so a module whose tag carries an out-of-range type index
reached the unchecked m_context.types[...] access and tripped a Vector
bounds assertion during validation.

Any WebAssembly.compile() of such a module aborts the WebContent
process.

Validate the tag's type index before using it, the same check
validate(TagType) already performs.
2026-06-04 13:54:58 +02:00
..
AbstractMachine.cpp LibWeb+LibWasm: Don't wait for JIT-compilation of wasm modules 2026-06-03 11:51:43 +02:00
AbstractMachine.h LibWeb+LibWasm: Don't wait for JIT-compilation of wasm modules 2026-06-03 11:51:43 +02:00
BytecodeInterpreter.cpp LibWasm: Handle traps emitted from cranelift 2026-06-03 11:51:43 +02:00
BytecodeInterpreter.h LibWasm+Meta: Add Cranelift AOT compilation backend 2026-05-10 16:41:42 +02:00
Configuration.cpp LibWeb+LibWasm: Don't wait for JIT-compilation of wasm modules 2026-06-03 11:51:43 +02:00
Configuration.h LibWeb+LibWasm: Don't wait for JIT-compilation of wasm modules 2026-06-03 11:51:43 +02:00
Interpreter.h LibWasm: Make traps hold on to externally-managed data 2025-04-22 08:43:46 -06:00
Operators.h LibWasm: Implement (n)madd/vetor dot arguments the right way 2025-12-12 19:12:53 +01:00
Validator.cpp LibWasm: Validate a tag's type index before dereferencing it 2026-06-04 13:54:58 +02:00
Validator.h LibWeb+LibWasm: Don't wait for JIT-compilation of wasm modules 2026-06-03 11:51:43 +02:00