In the Linux kernel, the following vulnerability has been resolved:
bpf: Skip invalid kfunc call in backtrack_insn
The verifier skips invalid kfunc call in check_kfunc_call(), which
would be captured in fixup_kfunc_call() if such insn is not eliminated
by dead code elimination. However, this can lead to the following
warning in backtrack_insn(), also see [1]:
------------[ cut here ]------------ verifier backtracking bug
WARNING: CPU: 6 PID: 8646 at kernel/bpf/verifier.c:2756 backtrack_insn
kernel/bpf/verifier.c:2756__mark_chain_precisionkernel/bpf/verifier.c:3065mark_chain_precisionkernel/bpf/verifier.c:3165adjust_reg_min_max_valskernel/bpf/verifier.c:10715check_alu_opkernel/bpf/verifier.c:10928do_checkkernel/bpf/verifier.c:13821[inline]do_check_commonkernel/bpf/verifier.c:16289 [...]
So make backtracking conservative with this by returning ENOTSUPP.