Files
linux/kernel
Alexei Starovoitov c6b0337f01 bpf: Don't mark arguments to fentry/fexit programs as trusted.
The PTR_TRUSTED flag should only be applied to pointers where the verifier can
guarantee that such pointers are valid.
The fentry/fexit/fmod_ret programs are not in this category.
Only arguments of SEC("tp_btf") and SEC("iter") programs are trusted
(which have BPF_TRACE_RAW_TP and BPF_TRACE_ITER attach_type correspondingly)

This bug was masked because convert_ctx_accesses() was converting trusted
loads into BPF_PROBE_MEM loads. Fix it as well.
The loads from trusted pointers don't need exception handling.

Fixes: 3f00c52393 ("bpf: Allow trusted pointers to be passed to KF_TRUSTED_ARGS kfuncs")
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20221124215314.55890-1-alexei.starovoitov@gmail.com
2022-11-24 23:47:09 +01:00
..
2022-09-28 09:02:20 +02:00
2022-09-26 19:46:18 -07:00
2022-08-29 19:47:03 -04:00
2022-09-26 10:13:13 -07:00
2021-09-08 15:32:35 -07:00
2022-03-15 10:32:44 +01:00
2022-09-01 16:55:35 +02:00
2022-06-29 13:07:16 +02:00
2022-02-25 09:36:06 +01:00