Re: [PATCH net v2 1/3] virtio-net: ensure the received length does not exceed allocated size
From: Jason Wang
Date: Mon Jun 30 2025 - 22:20:29 EST
On Mon, Jun 30, 2025 at 10:42 PM Bui Quang Minh
<minhquangbui99@xxxxxxxxx> wrote:
>
> In xdp_linearize_page, when reading the following buffers from the ring,
> we forget to check the received length with the true allocate size. This
> can lead to an out-of-bound read. This commit adds that missing check.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: 4941d472bf95 ("virtio-net: do not reset during XDP set")
> Signed-off-by: Bui Quang Minh <minhquangbui99@xxxxxxxxx>
Acked-by: Jason Wang <jasowang@xxxxxxxxxx>
Thanks