This test verifies that resolve_prog_type() works as expected when `attach_prog_fd` is not passed in. `prog->aux->dst_prog` in resolve_prog_type() is assigned by `attach_prog_fd`, and would be NULL if `attach_prog_fd` is not provided. Loading EXT prog with bpf_dynptr_from_skb() kfunc call in this way will lead to null-pointer-deref. Verify that the null-pointer-deref bug in resolve_prog_type() is fixed. Signed-off-by: Tengda Wu <wutengda@huaweicloud.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20240711145819.254178-3-wutengda@huaweicloud.com |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| atomic_and.c | ||
| atomic_bounds.c | ||
| atomic_cmpxchg.c | ||
| atomic_fetch.c | ||
| atomic_fetch_add.c | ||
| atomic_invalid.c | ||
| atomic_or.c | ||
| atomic_xchg.c | ||
| atomic_xor.c | ||
| basic.c | ||
| basic_call.c | ||
| basic_instr.c | ||
| basic_stx_ldx.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 | ||
| scale.c | ||
| sleepable.c | ||
| wide_access.c | ||