]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
UBUNTU: SAUCE: bpf: reject out-of-bounds stack pointer calculation
authorJann Horn <jannh@google.com>
Thu, 4 Jan 2018 14:01:21 +0000 (08:01 -0600)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:23:56 +0000 (13:23 +0100)
commit1c26ffd0e9b24d512824cabc6687a14d4777d0f3
tree099b7afee21c6cca57809853c0eb043969fe0078
parent2f45cd7a57da0a4d7f3a91a5f577c76b9ed9eb8a
UBUNTU: SAUCE: bpf: reject out-of-bounds stack pointer calculation

Reject programs that compute wildly out-of-bounds stack pointers.
Otherwise, pointers can be computed with an offset that doesn't fit into an
`int`, causing security issues in the stack memory access check (as well as
signed integer overflow during offset addition).

This is a fix specifically for the v4.9 stable tree because the mainline
code looks very different at this point.

Fixes: 7bca0a9702edf ("bpf: enhance verifier to understand stack pointer arithmetic")
Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
CVE-2017-17863
Link: https://www.spinics.net/lists/stable/msg206985.html
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
kernel/bpf/verifier.c