diff --git a/net/core/filter.c b/net/core/filter.c index 7fbee7570d0c..b7ac145b68b1 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -4330,7 +4330,8 @@ BPF_CALL_4(bpf_xdp_store_bytes, struct xdp_buff *, xdp, u32, offset, if (!ptr) bpf_xdp_copy_buf(xdp, offset, buf, len, true); else - memcpy(ptr, buf, len); + /* through a dynptr the source may be an overlapping slice */ + memmove(ptr, buf, len); return 0; }