numam-dpdk/lib/librte_bpf
Konstantin Ananyev 4715bb1623 bpf: fix validate for function return value
eval_call() blindly calls eval_max_bound() for external function
return value for all return types.
That causes wrong estimation for returned pointer min and max boundaries.
So any attempt to dereference that pointer value causes verifier to fail
with error message: "memory boundary violation at pc: ...".
To fix - estimate min/max boundaries based on the return value type.

Bugzilla ID: 298

Fixes: 8021917293 ("bpf: add extra validation for input BPF program")
Cc: stable@dpdk.org

Reported-by: Michel Machado <michel@digirati.com.br>
Suggested-by: Michel Machado <michel@digirati.com.br>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-07-04 10:33:13 +02:00
..
bpf_def.h bpf: fix pseudo calls for program loaded from ELF 2019-06-05 18:34:56 +02:00
bpf_exec.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
bpf_impl.h bpf: add extra information for external symbol definitions 2018-07-12 09:37:16 +02:00
bpf_jit_x86.c bpf: fix x86 JIT for immediate loads 2018-11-13 23:18:53 +01:00
bpf_load_elf.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
bpf_load.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
bpf_pkt.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
bpf_validate.c bpf: fix validate for function return value 2019-07-04 10:33:13 +02:00
bpf.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
Makefile bpf: introduce basic Rx/Tx filters 2018-05-12 00:36:34 +02:00
meson.build bpf: remove use of weak functions 2019-06-05 16:28:20 +02:00
rte_bpf_ethdev.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_bpf_version.map bpf: introduce basic Rx/Tx filters 2018-05-12 00:36:34 +02:00
rte_bpf.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00