bpf: force strict alignment checks for stack pointers
authorJann Horn <jannh@google.com>
Tue, 19 Dec 2017 04:11:58 +0000 (20:11 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Dec 2017 01:15:41 +0000 (02:15 +0100)
commita5ec6ae161d72f01411169a938fa5f8baea16e8f
treeac35208d260c569dff7eb526c5db93536e07b0f5
parentea25f914dc164c8d56b36147ecc86bc65f83c469
bpf: force strict alignment checks for stack pointers

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>
kernel/bpf/verifier.c