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