]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: fix integer overflow in queue_stack_map
authorAlexei Starovoitov <ast@kernel.org>
Thu, 22 Nov 2018 18:49:56 +0000 (10:49 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 22 Nov 2018 20:29:40 +0000 (21:29 +0100)
commit1d91e49de08ddee33e342f1a992fd50c7cb2611b
treec96784f1ab86f2fcdf98c420fd1f7fcb714e7107
parent3c94fb2cd51156b74ea6aeceabc9aca1bdd7b492
bpf: fix integer overflow in queue_stack_map

Fix the following issues:

- allow queue_stack_map for root only
- fix u32 max_entries overflow
- disallow value_size == 0

Fixes: 3f0ed437d88f ("bpf: add queue and stack maps")
Reported-by: Wei Wu <ww9210@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/queue_stack_maps.c