[PATCH 5.15.y 4/5] bpf: Fix out of bounds access for ringbuf helpers