mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
fix(kernel): validate symbol entries to prevent processing of invalid symbols
This commit is contained in:
@ -178,6 +178,12 @@ namespace SymbolResolver
|
||||
continue;
|
||||
}
|
||||
|
||||
if (unlikely(sym->st_name == (Elf_Word)-1 || sym->st_value == (Elf_Addr)-1 || sym->st_size == (uintptr_t)-1))
|
||||
{
|
||||
error("Symbol %d is invalid", i);
|
||||
continue;
|
||||
}
|
||||
|
||||
name = (const char *)&StringAddress[Symbols[i].st_name];
|
||||
if (!vmm.Check((void *)name))
|
||||
{
|
||||
|
Reference in New Issue
Block a user