* [PATCH bpf-next] selftests/bpf: Fix OOB write in test_verifier
@ 2021-12-14 1:48 Kumar Kartikeya Dwivedi
2021-12-14 14:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2021-12-14 1:48 UTC (permalink / raw)
To: bpf; +Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
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: e60e6962c503 ("selftests/bpf: Add tests for restricted helpers")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
tools/testing/selftests/bpf/test_verifier.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index ad5d30bafd93..33e2ecb3bef9 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -54,7 +54,7 @@
#define MAX_INSNS BPF_MAXINSNS
#define MAX_TEST_INSNS 1000000
#define MAX_FIXUPS 8
-#define MAX_NR_MAPS 21
+#define MAX_NR_MAPS 22
#define MAX_TEST_RUNS 8
#define POINTER_VALUE 0xcafe4all
#define TEST_DATA_LEN 64
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: Fix OOB write in test_verifier
2021-12-14 1:48 [PATCH bpf-next] selftests/bpf: Fix OOB write in test_verifier Kumar Kartikeya Dwivedi
@ 2021-12-14 14:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-14 14:30 UTC (permalink / raw)
To: Kumar Kartikeya Dwivedi; +Cc: bpf, ast, daniel, andrii
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Tue, 14 Dec 2021 07:18:00 +0530 you wrote:
> 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: e60e6962c503 ("selftests/bpf: Add tests for restricted helpers")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: Fix OOB write in test_verifier
https://git.kernel.org/bpf/bpf/c/f7abc4c8df8c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-14 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 1:48 [PATCH bpf-next] selftests/bpf: Fix OOB write in test_verifier Kumar Kartikeya Dwivedi
2021-12-14 14:30 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.