[PATCH net v3 0/4] virtio_net: fix out-of-bounds accesses and a heap info leak via the device stats reply

From
Lianjie Wang <hidden>
Date
2026-11-16 09:24:49
Also in
lkml, virtualization
With the statistics reply, a device can make the driver write past the
ethtool -S output array (patch 1), leak stale heap or loop forever
(patch 2), and read past the reply buffer (patch 3). Patch 4 returns an
error when the statistics command fails.

Claude Opus 5.5 was used to audit the driver and draft the patches.

v3:
- Rebase onto v7.4-rc3.
- Add patches 2 to 4 for the issues raised in the review [1].

[1] https://lore.kernel.org/all/20261110001659.1654289-2-kuba@kernel.org/ (local)
v2: https://lore.kernel.org/all/20261102205550.4148064-1-lian@is.s.u-tokyo.ac.jp/ (local)
v1: https://lore.kernel.org/all/20261022182710.2055771-1-karin0.zst@gmail.com/ (local)

Lianjie Wang (4):
  virtio_net: reject stats replies for queues outside the request
  virtio_net: zero the stats reply buffer
  virtio_net: keep reads of stats records within the reply buffer
  virtio_net: report a failed stats command as an error

 drivers/net/virtio_net.c | 33 ++++++++++++++++++++++++---------
 1 file changed, 24 insertions(+), 9 deletions(-)


base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
-- 
2.56.1
Thread (5 messages) 5 messages, 1 author, last reply 2d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help