diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 4afadb1576..581e283e0e 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -188,8 +188,9 @@ int Process::load(NonnullRefPtr main_program_description, RefPt return 0; } - // TODO: This should be randomized for ASLR - constexpr FlatPtr interpreter_load_offset = 0x08000000; + // TODO: I'm sure this can be randomized even better. :^) + FlatPtr random_offset = get_good_random() * PAGE_SIZE; + FlatPtr interpreter_load_offset = 0x08000000 + random_offset; auto interpreter_load_result = load_elf_object(*interpreter_description, interpreter_load_offset, ShouldAllocateTls::No); if (interpreter_load_result.is_error())