Skip to content

hw/virtio: Protect from more DMA re-entrancy bugs

Philippe Mathieu-Daudé qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesIn review
  2. v14 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- Take a DeviceState argument, not VirtIODevice, so it works seamlessly with CCW devices (actually the original code from Gerd).
- Build and test :>

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4hw/virtio: Introduce virtio_bh_new_guarded() helperhw/virtio/virtio.c include/hw/virtio/virtio.h+17 -00 replies
2/4hw/display/virtio-gpu: Protect from DMA re-entrancy bugshw/display/virtio-gpu.c+2 -40 replies
3/4hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugshw/char/virtio-serial-bus.c+1 -20 replies
4/4hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugshw/virtio/virtio-crypto.c+2 -20 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGerd HoffmannMichael S. Tsirkin
SeriesR-b
1/4Inspired-by R-b A-b
2/4R-b A-b
3/4R-b A-b
4/4R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH-for-9.0 v2 0/4] hw/virtio: Protect from more DMA re-entrancy bugs

Fixes for CVE-2024-3446.

Gerd suggested to use the transport guard to protect the device from DMA re-entrancy abuses.

Since v1:
- Take a DeviceState argument, not VirtIODevice, so it works seamlessly with CCW devices (actually the original code from Gerd).
- Build and test :>

I'll send a PR with these patches later today.

Regards,

Phil.

Philippe Mathieu-Daudé (4):
hw/virtio: Introduce virtio_bh_new_guarded() helper hw/display/virtio-gpu: Protect from DMA re-entrancy bugs hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs

 include/hw/virtio/virtio.h  |  7 +++++++
 hw/char/virtio-serial-bus.c |  3 +--
 hw/display/virtio-gpu.c     |  6 ++----
 hw/virtio/virtio-crypto.c   |  4 ++--
 hw/virtio/virtio.c          | 10 ++++++++++
 5 files changed, 22 insertions(+), 8 deletions(-)
Signature · 1 line
2.41.0