Skip to content
Commit a8d89feb authored by Andrei Matei's avatar Andrei Matei Committed by Alexei Starovoitov
Browse files

bpf: Check bloom filter map value size



This patch adds a missing check to bloom filter creating, rejecting
values above KMALLOC_MAX_SIZE. This brings the bloom map in line with
many other map types.

The lack of this protection can cause kernel crashes for value sizes
that overflow int's. Such a crash was caught by syzkaller. The next
patch adds more guard-rails at a lower level.

Signed-off-by: default avatarAndrei Matei <andreimatei1@gmail.com>
Acked-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240327024245.318299-2-andreimatei1@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 96b98a65
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment