aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2021-08-23 19:02:09 +0000
committerDaniel Borkmann <[email protected]>2021-08-23 21:09:10 +0000
commit5b029a32cfe4600f5e10e36b41778506b90fd4de (patch)
tree04dc380de5bc49370a44f5e1d350a47cb6f5a112 /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
parentnet: stmmac: fix kernel panic due to NULL pointer dereference of plat->est (diff)
downloadkernel-5b029a32cfe4600f5e10e36b41778506b90fd4de.tar.gz
kernel-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 <[email protected]> Acked-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions