diff options
author | John Fastabend <john.fastabend@gmail.com> | 2020-03-31 00:37:19 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-23 11:38:27 +0300 |
commit | af06d90741d0fc57fc10bc05c1340f6bfa3864c1 (patch) | |
tree | b1a788219c7a243e56b7cfb05432ad4a4029cfa7 /block/t10-pi.c | |
parent | 8389a64c68e236e2b777409e97f1f077cfba9057 (diff) | |
download | linux-af06d90741d0fc57fc10bc05c1340f6bfa3864c1.tar.xz |
bpf: Test_progs, add test to catch retval refine error handling
commit d2db08c7a14e0b5eed6132baf258b80622e041a9 upstream.
Before this series the verifier would clamp return bounds of
bpf_get_stack() to [0, X] and this led the verifier to believe
that a JMP_JSLT 0 would be false and so would prune that path.
The result is anything hidden behind that JSLT would be unverified.
Add a test to catch this case by hiding an goto pc-1 behind the
check which will cause an infinite loop if not rejected.
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158560423908.10843.11783152347709008373.stgit@john-Precision-5820-Tower
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/t10-pi.c')
0 files changed, 0 insertions, 0 deletions