diff options
| author | 2026-09-02 16:36:58 -0700 | |
|---|---|---|
| committer | 2026-09-02 17:50:09 -0700 | |
| commit | ac0aaef0aa997fcdcb2458bd584539ba8608d33e (patch) | |
| tree | cd59b2e8f7fca6bcd24a37a4c73d221ab273dc50 /scripts/Makefile.thinlto | |
| parent | bpf: reject BPF_PSEUDO_FUNC reference to the main program (diff) | |
selftests/bpf: BPF_PSEUDO_FUNC reference to the main program
Add a test case for a BPF_PSEUDO_FUNC load instruction that references
the entry function of the program it belongs to. W/o the previous
patch the verifier accepts this program thus allowing a runtime call
at a bogus address. See previous patch for detailed description.
Main function needs to be marked with BTF_FUNC_STATIC for the test to
trigger the bug, the patch uses test_verifier harness instead of
test_prog because libbpf has no way to convey this.
Reported-by: Nicholas Carlini <npc@anthropic.com>
Suggested-by: Nicholas Carlini <npc@anthropic.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260902233658.1186477-2-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
