aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-12-14 19:25:13 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-12-16 21:41:04 +0100
commit588a25e92458c6efeb7a261d5ca5726f5de89184 (patch)
treef1cc569bf341ba9c79283cff213b5e3beb5762f8 /tools
parent433956e91200734d09958673a56df02d00a917c2 (diff)
bpf: Fix extable address check.
The verifier checks that PTR_TO_BTF_ID pointer is either valid or NULL, but it cannot distinguish IS_ERR pointer from valid one. When offset is added to IS_ERR pointer it may become small positive value which is a user address that is not handled by extable logic and has to be checked for at the runtime. Tighten BPF_PROBE_MEM pointer check code to prevent this case. Fixes: 4c5de127598e ("bpf: Emit explicit NULL pointer checks for PROBE_LDX instructions.") Reported-by: Lorenzo Fontana <lorenzo.fontana@elastic.co> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions