In the Linux kernel, the following vulnerability has been resolved: bpf: Check skb->transportheader is set in bpfskbcheckmtu The bpfskbcheckmtu helper needs to use skb->transportheader when the BPFMTUCHKSEGS flag is used: bpfskbcheckmtu(skb, ifindex, &mtulen, 0, BPFMTUCHKSEGS) The transportheader is not always set. There is a WARNONONCE report when CONFIGDEBUGNET is enabled + skb->gsosize is set + bpfprogtestrun is used: WARNING: CPU: 1 PID: 2216 at ./include/linux/skbuff.h:3071 skbgsovalidatenetworklen bpfskbcheckmtu bpfprog3920e25740a41171tcchksegsflag # A test in the next patch bpftestrun bpfprogtestrunskb For a normal ingress skb (not testrun), skbresettransportheader is performed but there is plan to avoid setting it as described in commit 2170a1f09148 ("net: no longer reset transportheader in _netifreceiveskbcore()"). This patch fixes the bpf helper by checking skbtransportheaderwasset(). The check is done just before skb->transportheader is used, to avoid breaking the existing bpf prog. The WARNONONCE is limited to bpfprogtest_run, so targeting bpf-next.