WSL2-Linux-Kernel/arch/x86
Kees Cook 06cb3463aa x86: Increase brk randomness entropy for 64-bit systems
[ Upstream commit 44c76825d6eefee9eb7ce06c38e1a6632ac7eb7d ]

In commit c1d171a002 ("x86: randomize brk"), arch_randomize_brk() was
defined to use a 32MB range (13 bits of entropy), but was never increased
when moving to 64-bit. The default arch_randomize_brk() uses 32MB for
32-bit tasks, and 1GB (18 bits of entropy) for 64-bit tasks.

Update x86_64 to match the entropy used by arm64 and other 64-bit
architectures.

Reported-by: y0un9n132@gmail.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jiri Kosina <jkosina@suse.com>
Closes: https://lore.kernel.org/linux-hardening/CA+2EKTVLvc8hDZc+2Yhwmus=dzOUG5E4gV7ayCbu0MPJTZzWkw@mail.gmail.com/
Link: https://lore.kernel.org/r/20240217062545.1631668-1-keescook@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-04 13:23:25 +02:00
..
boot arch: Introduce CONFIG_FUNCTION_ALIGNMENT 2024-04-10 16:18:49 +02:00
configs
crypto crypto: x86/sha512-avx2 - add missing vzeroupper 2024-06-16 13:39:17 +02:00
entry x86/bhi: Avoid warning in #DB handler due to BHI mitigation 2024-07-18 13:07:45 +02:00
events perf/x86/intel/pt: Fix a topa_entry base address calculation 2024-08-19 05:45:19 +02:00
hyperv
ia32
include efi/x86: Free EFI memory map only when installing a new one. 2024-07-05 09:14:51 +02:00
kernel x86: Increase brk randomness entropy for 64-bit systems 2024-09-04 13:23:25 +02:00
kvm KVM: VMX: Split out the non-virtualization part of vmx_interrupt_blocked() 2024-08-19 05:45:14 +02:00
lib x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map 2024-06-16 13:39:31 +02:00
math-emu
mm x86/mm: Fix pti_clone_entry_text() for i386 2024-08-19 05:45:35 +02:00
net x86/returnthunk: Allow different return thunks 2024-03-01 13:21:49 +01:00
pci x86/pci/xen: Fix PCIBIOS_* return code handling 2024-08-19 05:44:50 +02:00
platform x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos 2024-08-19 05:44:50 +02:00
power
purgatory x86/purgatory: Switch to the position-independent small code model 2024-06-16 13:39:22 +02:00
ras
realmode
tools x86/boot: Ignore relocations in .notes sections in walk_relocs() too 2024-06-16 13:39:18 +02:00
um
video
xen x86/xen: Convert comma to semicolon 2024-08-19 05:44:54 +02:00
.gitignore
Kbuild
Kconfig cpu: Re-enable CPU mitigations by default for !X86 architectures 2024-05-02 16:24:48 +02:00
Kconfig.assembler
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 08:55:08 +01:00
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-06-16 13:39:46 +02:00
Makefile
Makefile.um
Makefile_32.cpu