android_kernel_motorola_sm6375/arch/mips
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alexander Lobakin f7a97dc302 MIPS: relocatable: fix possible boot hangup with KASLR enabled
commit 69e976831cd53f9ba304fd20305b2025ecc78eab upstream.

LLVM-built Linux triggered a boot hangup with KASLR enabled.

arch/mips/kernel/relocate.c:get_random_boot() uses linux_banner,
which is a string constant, as a random seed, but accesses it
as an array of unsigned long (in rotate_xor()).
When the address of linux_banner is not aligned to sizeof(long),
such access emits unaligned access exception and hangs the kernel.

Use PTR_ALIGN() to align input address to sizeof(long) and also
align down the input length to prevent possible access-beyond-end.

Fixes: 405bc8fd12 ("MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE")
Cc: [email protected] # 4.7+
Signed-off-by: Alexander Lobakin <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-19 18:26:12 +01:00
..
alchemy MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu 2020-11-24 13:29:07 +01:00
ar7
ath25
ath79
bcm47xx MIPS: BCM47XX: fix kconfig dependency bug for BCM47XX_BCMA 2020-12-30 11:51:07 +01:00
bcm63xx
bmips
boot MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB 2021-01-19 18:26:12 +01:00
cavium-octeon MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() 2020-08-19 08:16:15 +02:00
cobalt
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
crypto
dec MIPS: DEC: Restore bootmem reservation for firmware working memory area 2020-11-05 11:43:30 +01:00
emma
fw
generic
include arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed 2020-12-02 08:49:50 +01:00
jazz
jz4740
kernel MIPS: relocatable: fix possible boot hangup with KASLR enabled 2021-01-19 18:26:12 +01:00
kvm KVM: MIPS: Change the definition of kvm type 2020-09-23 12:40:38 +02:00
lantiq MIPS: lantiq: xway: sysctrl: fix the GPHY clock alias names 2020-07-09 09:37:56 +02:00
lasat
lib mips: lib: uncached: fix non-standard usage of variable 'sp' 2021-01-19 18:26:12 +01:00
loongson32
loongson64 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() 2020-02-24 08:36:27 +01:00
math-emu
mm mips: fix Section mismatch in reference 2021-01-19 18:26:12 +01:00
mti-malta
net bpf, mips: Limit to 33 tail calls 2020-01-12 12:21:24 +01:00
netlogic
oprofile
paravirt
pci MIPS: PCI: Fix MIPS build 2020-11-22 10:14:11 +01:00
pic32
pistachio
pmcs-msp71xx
pnx833x
power
ralink
rb532
sgi-ip22
sgi-ip27 MIPS: SGI-IP27: Fix crash, when CPUs are disabled via nr_cpus parameter 2020-01-17 19:48:55 +01:00
sgi-ip32
sibyte
sni MIPS: SNI: Fix spurious interrupts 2020-09-23 12:40:42 +02:00
tools MIPS: tools: Fix resource leak in elf-entry.c 2020-06-22 09:31:08 +02:00
txx9
vdso mips/vdso: Fix resource leaks in genvdso.c 2020-09-03 11:26:45 +02:00
vr41xx
Kbuild
Kbuild.platforms
Kconfig MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT 2020-09-23 12:40:41 +02:00
Kconfig.debug
Makefile MIPS: Truncate link address into 32bit for 32bit kernel 2020-06-22 09:31:03 +02:00
Makefile.postlink MIPS: fix indentation of the 'RELOCS' message 2020-02-11 04:35:16 -08:00