OSDN Git Service

bpf: force strict alignment checks for stack pointers
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 22 Dec 2017 15:23:09 +0000 (16:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:32 +0000 (14:26 +0100)
commitc90268f7cbee0781331b96d1423d0f28a6183889
tree5dcdbe6680a632646d6777586b5c6e7038331439
parent2120fca0ecfb4552d27608d409ebd3403ce02ce4
bpf: force strict alignment checks for stack pointers

From: Jann Horn <jannh@google.com>

[ Upstream commit a5ec6ae161d72f01411169a938fa5f8baea16e8f ]

Force strict alignment checks for stack pointers because the tracking of
stack spills relies on it; unaligned stack accesses can lead to corruption
of spilled registers, which is exploitable.

Fixes: f1174f77b50c ("bpf/verifier: rework value tracking")
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/bpf/verifier.c