android_kernel_oneplus_msm8998/arch/arm64
Mark Rutland 06dd8281a7 arm64: uaccess: ensure extension of access_ok() addr
commit a06040d7a791a9177581dcf7293941bd92400856 upstream.

Our access_ok() simply hands its arguments over to __range_ok(), which
implicitly assummes that the addr parameter is 64 bits wide. This isn't
necessarily true for compat code, which might pass down a 32-bit address
parameter.

In these cases, we don't have a guarantee that the address has been zero
extended to 64 bits, and the upper bits of the register may contain
unknown values, potentially resulting in a suprious failure.

Avoid this by explicitly casting the addr parameter to an unsigned long
(as is done on other architectures), ensuring that the parameter is
widened appropriately.

Fixes: 0aea86a217 ("arm64: User access library functions")
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 14:30:15 +02:00
..
boot arm64: dts: rockchip: add reset saradc node for rk3368 SoCs 2016-09-07 08:32:41 +02:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes 2017-02-09 08:02:45 +01:00
include arm64: uaccess: ensure extension of access_ok() addr 2017-05-25 14:30:15 +02:00
kernel arm64: avoid returning from bad_mode 2017-01-26 08:23:50 +01:00
kvm arm64: KVM: Fix decoding of Rt/Rt2 when trapping AArch32 CP accesses 2017-05-20 14:27:02 +02:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call 2016-12-08 07:15:24 +01:00
net bpf, arm64: fix jit branch offset related to ldimm64 2017-05-14 13:32:58 +02:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 2016-09-15 08:27:47 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: DT updates for v4.4 2015-11-10 15:06:26 -08:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-03-03 15:07:08 -08:00