Commit 982beb75 authored by Bui Quang Minh's avatar Bui Quang Minh Committed by Greg Kroah-Hartman
Browse files

virtio-net: ensure the received length does not exceed allocated size



[ Upstream commit 315dbdd7 ]

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@vger.kernel.org>
Fixes: 4941d472 ("virtio-net: do not reset during XDP set")
Signed-off-by: default avatarBui Quang Minh <minhquangbui99@gmail.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://patch.msgid.link/20250630144212.48471-2-minhquangbui99@gmail.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c47c83f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment