]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix possible spectre-v1 in ptrace_hbp_get_event()
authorMark Rutland <mark.rutland@arm.com>
Wed, 25 Apr 2018 16:13:40 +0000 (17:13 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 26 Apr 2018 15:58:39 +0000 (16:58 +0100)
commit527d9dac2e80b1306247f9ecc28d60ee08fd8a14
treedd3b7b1e9dc98708b0f28711df83b16b7eb85ebf
parenta05ac7b3c2706ff1b76758a6029e4aa51fd51fda
arm64: fix possible spectre-v1 in ptrace_hbp_get_event()

It's possible for userspace to control idx. Sanitize idx when using it
as an array index.

Found by smatch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/ptrace.c