bpf-examples
bpf-examples copied to clipboard
nat64-bpf: Kernel verifier blocks loading the program's latest version
OS: Ubuntu 21.10 Kernel-Version: 5.13.0-35-generic libbpf commit: be89b28f96be426e30a2b0c5312d13b30ee518c7 (same as checked in the nat64 example) Clang, llvm version: 13
The commit Handle ICMP rewriting on the nat64-bpf example doesn't pass the kernel verifier check and kernel verifier blocks the program loading. The issue is with the rewrite_icmpv6 function mainly with the lines where we return -1. If lines where we check for MTU bounds and return -1 if out of bound is commented along with the code below it in rewrite_icmpv6 function then it works. Similarly, if we comment all the return statements below apart from the last return 0 statement then the program gets loaded successfully. Any suggestions?