[PATCH openEuler-5.10 42/48] bpf: Fix out of bounds access for ringbuf helpers