[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d94bf8c7-b026-4608-83d7-6230f136ee3b@iogearbox.net>
Date: Thu, 24 Oct 2024 11:41:19 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Byeonguk Jeong <jungbu2855@...il.com>,
Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Yonghong Song <yonghong.song@...ux.dev>, bpf <bpf@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] selftests/bpf: Add test for trie_get_next_key()
Hi Byeonguk,
On 10/24/24 11:08 AM, Byeonguk Jeong wrote:
> Add a test for out-of-bounds write in trie_get_next_key() when a full
> path from root to leaf exists and bpf_map_get_next_key() is called
> with the leaf node. It may crashes the kernel on failure, so please
> run in a VM.
>
> Signed-off-by: Byeonguk Jeong <jungbu2855@...il.com>
Could you submit the fix + this selftest as a 2-patch series, otherwise BPF CI
cannot test both in combination (pls make sure subject has [PATCH bpf] so that
our CI adds this on top of the bpf tree).
Right now the CI selftest build threw an error:
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/map_tests/lpm_trie_map_get_next_key.c: In function ‘test_lpm_trie_map_get_next_key’:
/tmp/work/bpf/bpf/tools/testing/selftests/bpf/map_tests/lpm_trie_map_get_next_key.c:84:9: error: format not a string literal and no format arguments [-Werror=format-security]
84 | CHECK(map_fd == -1, "bpf_map_create(), error:%s\n",
| ^~~~~
TEST-OBJ [test_maps] task_storage_map.test.o
TEST-OBJ [test_progs] access_variable_array.test.o
cc1: all warnings being treated as errors
TEST-OBJ [test_progs] align.test.o
TEST-OBJ [test_progs] arena_atomics.test.o
make: *** [Makefile:765: /tmp/work/bpf/bpf/tools/testing/selftests/bpf/lpm_trie_map_get_next_key.test.o] Error 1
make: *** Waiting for unfinished jobs....
GEN-SKEL [test_progs-no_alu32] test_usdt.skel.h
make: Leaving directory '/tmp/work/bpf/bpf/tools/testing/selftests/bpf'
Also on quick glance, please use ASSERT_*() macros instead of CHECK() as the
latter is deprecated.
Thanks,
Daniel
Powered by blists - more mailing lists