mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix missing validation of program entry points.
This commit is contained in:
parent
b54e09ebaf
commit
1dbd1f760a
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ uintptr_t Load(const void* file_ptr, size_t file_size, Auxiliary* aux)
|
|||
if ( header->e_type != ET_EXEC )
|
||||
return errno = EINVAL, 0;
|
||||
|
||||
if ( header->e_entry == 0 )
|
||||
if ( header->e_entry < userspace_addr || userspace_end <= header->e_entry )
|
||||
return errno = EINVAL, 0;
|
||||
|
||||
if ( file_size < header->e_phoff )
|
||||
|
|
Loading…
Reference in a new issue