Commit 1f81d511 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Greg Kroah-Hartman
Browse files

ELF: fix kernel.randomize_va_space double read



[ Upstream commit 2a97388a ]

ELF loader uses "randomize_va_space" twice. It is sysctl and can change
at any moment, so 2 loads could see 2 different values in theory with
unpredictable consequences.

Issue exactly one load for consistent value across one exec.

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Link: https://lore.kernel.org/r/3329905c-7eb8-400a-8f0a-d87cff979b5b@p183


Signed-off-by: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4effd088
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment