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 checkkfunccall(), which would be captured in fixupkfunccall() 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 backtrackinsn kernel/bpf/verifier.c:2756 _markchainprecision kernel/bpf/verifier.c:3065 markchainprecision kernel/bpf/verifier.c:3165 adjustregminmaxvals kernel/bpf/verifier.c:10715 checkaluop kernel/bpf/verifier.c:10928 docheck kernel/bpf/verifier.c:13821 [inline] docheck_common kernel/bpf/verifier.c:16289 [...]
So make backtracking conservative with this by returning ENOTSUPP.
[1] https://lore.kernel.org/bpf/CACkBjsaXNceR8ZjkLG=dT3P=4A8SBsg0Z5h5PWLryF5=ghKq=g@mail.gmail.com/