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/[email protected]/
v2: 
https://lore.kernel.org/all/[email protected]/
v1: https://lore.kernel.org/all/[email protected]/

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


Reply via email to