diff options
author | 2021-08-23 21:02:09 +0200 | |
---|---|---|
committer | 2021-08-23 23:09:10 +0200 | |
commit | 5b029a32cfe4600f5e10e36b41778506b90fd4de (patch) | |
tree | 04dc380de5bc49370a44f5e1d350a47cb6f5a112 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | net: stmmac: fix kernel panic due to NULL pointer dereference of plat->est (diff) | |
download | wireguard-linux-5b029a32cfe4600f5e10e36b41778506b90fd4de.tar.xz wireguard-linux-5b029a32cfe4600f5e10e36b41778506b90fd4de.zip |
bpf: Fix ringbuf helper function compatibility
Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support
for it") extended check_map_func_compatibility() by enforcing map -> helper
function match, but not helper -> map type match.
Due to this all of the bpf_ringbuf_*() helper functions could be used with
a wrong map type such as array or hash map, leading to invalid access due
to type confusion.
Also, both BPF_FUNC_ringbuf_{submit,discard} have ARG_PTR_TO_ALLOC_MEM as
argument and not a BPF map. Therefore, their check_map_func_compatibility()
presence is incorrect since it's only for map type checking.
Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it")
Reported-by: Ryota Shiga (Flatt Security)
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions