]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 4 Apr 2024 18:56:41 +0000 (20:56 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 Apr 2024 17:32:12 +0000 (20:32 +0300)
commit4f01537ced3e787bd985b8f8de5869b92657160a
tree3a3f3afb414bc4aafc0f4344cf062db6de4c5b0a
parentfbeb0a160cbcc067c0e1f0d380cea4a31de213e3
hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs

Replace qemu_bh_new_guarded() by virtio_bh_new_guarded()
so the bus and device use the same guard. Otherwise the
DMA-reentrancy protection can be bypassed.

Fixes: CVE-2024-3446
Cc: qemu-stable@nongnu.org
Suggested-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20240409105537.18308-5-philmd@linaro.org>
(cherry picked from commit f4729ec39ad97a42ceaa7b5697f84f440ea6e5dc)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/virtio/virtio-crypto.c