Skip to content

hw/nvme: Fix CVE-2021-3929 (DMA re-entrancy exploitation)

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hw/nvme/ctrl: Do not ignore DMA access errorshw/nvme/ctrl.c+4 -31 reply
2/2hw/nvme/ctrl: Prohibit DMA accesses to devices (CVE-2021-3929)hw/nvme/ctrl.c+1 -12 replies

Reviews trailers per patch

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

PatchKeith BuschKlaus Jensen
SeriesR-b
1/2R-b
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 0/2] hw/nvme: Fix CVE-2021-3929 (DMA re-entrancy exploitation)

Now that the DMA API allow passing MemTxAttrs argument and returning MemTxResult (with MEMTX_BUS_ERROR in particular), we can restrict the NVMe controller to memories (prohibitting accesses by the DMA engine to devices) and block yet another DMA re-entrancy attack.

I'll will try to get a reproducer (and authorization to commit it as qtest) from the reporter.

Based-on: <[email protected]>
"hw: Have DMA API take MemTxAttrs arg & propagate MemTxResult (part 2)"
https://lore.kernel.org/qemu-devel/[email protected]/

Philippe Mathieu-Daudé (2):
hw/nvme/ctrl: Do not ignore DMA access errors hw/nvme/ctrl: Prohibit DMA accesses to devices (CVE-2021-3929)

 hw/nvme/ctrl.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.33.1