]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix OOB write in test_verifier
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Tue, 14 Dec 2021 01:48:00 +0000 (07:18 +0530)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 14 Dec 2021 14:28:15 +0000 (15:28 +0100)
commit6bace415d5ebd992b19b32dc562151fc5c8142f4
tree409ee29ece0bd82e9f67bdecf862d0afe5f1d1d1
parentfd6945a2d7831b6e4f204ae6b5ec6e34230b9705
selftests/bpf: Fix OOB write in test_verifier

The commit referenced below added fixup_map_timer support (to create a
BPF map containing timers), but failed to increase the size of the
map_fds array, leading to out of bounds write. Fix this by changing
MAX_NR_MAPS to 22.

Fixes: 5bd6ff59f3b8 ("selftests/bpf: Add tests for restricted helpers")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211214014800.78762-1-memxor@gmail.com
tools/testing/selftests/bpf/test_verifier.c