Skip to content

Commit fa8a80a

Browse files
authored
aot loader: Prevent loading multiple native symbol sections (#3538)
Don't allow to load multiple native symbol sections in aot loader since the aot compiler will create only one native symbol section. Fix issue reported by Oss-fuzz test (#69633).
1 parent c19bc95 commit fa8a80a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/iwasm/aot/aot_loader.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,12 @@ load_native_symbol_section(const uint8 *buf, const uint8 *buf_end,
651651
int32 i;
652652
const char *symbol;
653653

654+
if (module->native_symbol_list) {
655+
set_error_buf(error_buf, error_buf_size,
656+
"duplicated native symbol section");
657+
return false;
658+
}
659+
654660
read_uint32(p, p_end, cnt);
655661

656662
if (cnt > 0) {

0 commit comments

Comments
 (0)