mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
fix(kernel): validate symbol entries to prevent processing of invalid symbols
This commit is contained in:
parent
2d2d28689c
commit
a16a88b5f9
@ -178,6 +178,12 @@ namespace SymbolResolver
|
|||||||
continue;
|
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];
|
name = (const char *)&StringAddress[Symbols[i].st_name];
|
||||||
if (!vmm.Check((void *)name))
|
if (!vmm.Check((void *)name))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user