mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 10:02:02 +02:00
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> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| atomic_and.c | ||
| atomic_bounds.c | ||
| atomic_cmpxchg.c | ||
| atomic_fetch_add.c | ||
| atomic_fetch.c | ||
| atomic_invalid.c | ||
| atomic_or.c | ||
| atomic_xchg.c | ||
| atomic_xor.c | ||
| basic_call.c | ||
| basic_instr.c | ||
| basic_stx_ldx.c | ||
| basic.c | ||
| bpf_loop_inline.c | ||
| bpf_st_mem.c | ||
| calls.c | ||
| ctx_sk_lookup.c | ||
| ctx_skb.c | ||
| dead_code.c | ||
| direct_value_access.c | ||
| event_output.c | ||
| jit.c | ||
| jmp32.c | ||
| jset.c | ||
| jump.c | ||
| junk_insn.c | ||
| ld_abs.c | ||
| ld_dw.c | ||
| ld_imm64.c | ||
| map_kptr.c | ||
| perf_event_sample_period.c | ||
| precise.c | ||
| pseudo_func.c | ||
| scale.c | ||
| sleepable.c | ||
| wide_access.c | ||