File tree Expand file tree Collapse file tree
crates/wasmtime/src/runtime/vm
tests/misc_testsuite/memory64 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 44.0.1
2+
3+ Released 2026-04-30.
4+
5+ ### Fixed
6+
7+ * Panic when allocating a table exceeding the size of the host's address space.
8+ [ GHSA-p8xm -42r7-89xg] ( https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-p8xm-42r7-89xg )
9+
10+ --------------------------------------------------------------------------------
11+
112## 44.0.0
213
314Released 2026-04-20.
Original file line number Diff line number Diff line change @@ -309,7 +309,9 @@ unsafe fn alloc_dynamic_table_elements<T>(len: usize) -> Result<TryVec<Option<T>
309309
310310 let size = mem:: size_of :: < Option < T > > ( ) ;
311311 let size = size. next_multiple_of ( align) ;
312- let size = size. checked_mul ( len) . unwrap ( ) ;
312+ let size = size
313+ . checked_mul ( len)
314+ . ok_or_else ( || format_err ! ( "overflow calculating table allocation size" ) ) ?;
313315
314316 let layout = Layout :: from_size_align ( size, align) ?;
315317
Original file line number Diff line number Diff line change 1+ ;; ! memory64 = true
2+ ;; ! hogs_memory = true
3+ ;; ! reference_types = true
4+
5+ (assert_trap
6+ (module (table i64 0x2000_0000_0000_0000 funcref ))
7+ " overflow calculating table allocation size" )
8+
9+ (module
10+ (table i64 0 funcref )
11+ (func (export " grow" ) (param i64 ) (result i64 )
12+ (table.grow 0 (ref.null func ) (local.get 0 ))
13+ )
14+ )
15+
16+ (assert_trap (invoke " grow" (i64.const 0x2000_0000_0000_0000 ))
17+ " failed to allocate" )
You can’t perform that action at this time.
0 commit comments