]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: fix possible spectre-v1 write in ptrace_hbp_set_event()
authorMark Rutland <mark.rutland@arm.com>
Tue, 10 Jul 2018 18:01:22 +0000 (19:01 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 24 Apr 2019 08:09:06 +0000 (10:09 +0200)
commitcfb2ecd7895f554b4fc30c790553d79b57a9354d
tree7c3609ea11836a6b5515c45ea0fbbff1e5a82726
parent7046f57cc6e98ac317460f15a657ac8935cba92f
arm64: fix possible spectre-v1 write in ptrace_hbp_set_event()

It's possible for userspace to control idx. Sanitize idx when using it
as an array index, to inhibit the potential spectre-v1 write gadget.

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>
CVE-2017-5753

(cherry picked from commit 14d6e289a89780377f8bb09de8926d3c62d763cd)
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
arch/arm64/kernel/ptrace.c