]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: don't prune branches when a scalar is replaced with a pointer
authorJann Horn <jannh@google.com>
Tue, 19 Dec 2017 04:11:59 +0000 (20:11 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 21 Dec 2017 01:15:41 +0000 (02:15 +0100)
commite268d8bb2b95ba080758d3cf6de886512f35068c
tree67a91e768530270c4ba22747afde33fc23b40cf1
parentad90d49172d738772f988cbd0fd150a8e2b2ecac
bpf: don't prune branches when a scalar is replaced with a pointer

This could be made safe by passing through a reference to env and checking
for env->allow_ptr_leaks, but it would only work one way and is probably
not worth the hassle - not doing it will not directly lead to program
rejection.

Fixes: 8e11845d64e4 ("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