- hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/display/virtio-gpu: Protect from DMA re-entrancy bugs(CVE-2024-3446) - hw/virtio: Introduce virtio_bh_new_guarded() helper - hw: replace most qemu_bh_new calls with qemu_bh_new_guarded - checkpatch: add qemu_bh_new/aio_bh_new checks - async: avoid use-after-free on re-entrancy guard - async: Add an optional reentrancy guard to the BH API - hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set(CVE-2024-3447) - rtl8139: Remove unused variable - tulip: Remove unused variable - virtio-mem: Fix the bitmap index of the section offset - virtio-mem: Fix the iterator variable in a vmem->rdl_list loop - system/memory: use ldn_he_p/stn_he_p - block: Fix crash when loading snapshot on inactive node - smmu: Clear SMMUPciBus pointer cache when system reset - block/mirror: Fix NULL s->job in active writes - amd_iommu: Fix APIC address check - virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_reques - libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick cherry-pick from 66e411885a23c96ff73742d06b793fec3ceaebb7 - ivshmem-test.c: enable test_ivshmem_server for ppc64 arch - ivshmem.c: change endianness to LITTLE_ENDIAN - hw/ppc/mac.h: Remove MAX_CPUS macro - configure: remove dead variables - virtio-gpu: do not byteswap padding - hw/intc: clean-up error reporting for failed ITS cmd - qemu-iotests: Discard stderr when probing devices - linux-user: un-parent OBJECT(cpu) when closing thread - hw/net/rocker: Avoid undefined shifts with more than 31 ports - contrib/vhost-user-blk: Clean up deallocation of VuVirtqElement - scsi-disk: fix overflow when block size is not a multiple of BDRV_SECTOR_SIZE Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit bf54b48c2963c869dfdc89977c57be4bd9e772aa)
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
From c4acd87e379d6b6c3a9b8e381c91af255d96aeaa Mon Sep 17 00:00:00 2001
|
|
From: guping <guping_yewu@cmss.chinamobile.com>
|
|
Date: Sat, 30 Mar 2024 14:59:51 +0000
|
|
Subject: [PATCH] libqos/virtio.c: Correct 'flags' reading in qvirtqueue_kick
|
|
cherry-pick from 66e411885a23c96ff73742d06b793fec3ceaebb7
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
In qvirtqueue_kick(), the 'flags' were previously being incorrectly read from
|
|
vq->avail instead of the correct vq->used location. This update ensures 'flags'
|
|
are read from the correct location as per the virtio standard.
|
|
|
|
Signed-off-by: default avatarZheyu Ma <zheyuma97@gmail.com>
|
|
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
|
|
Reviewed-by: Stefan Hajnoczi's avatarStefan Hajnoczi <stefanha@redhat.com>
|
|
Message-ID: <20240320090442.267525-1-zheyuma97@gmail.com>
|
|
Signed-off-by: Thomas Huth's avatarThomas Huth <thuth@redhat.com>
|
|
|
|
Signed-off-by: guping <guping_yewu@cmss.chinamobile.com>
|
|
---
|
|
tests/qtest/libqos/virtio.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
|
|
index 6fe7bf9555..08e5bcdca1 100644
|
|
--- a/tests/qtest/libqos/virtio.c
|
|
+++ b/tests/qtest/libqos/virtio.c
|
|
@@ -377,7 +377,7 @@ void qvirtqueue_kick(QTestState *qts, QVirtioDevice *d, QVirtQueue *vq,
|
|
qvirtio_writew(d, qts, vq->avail + 2, idx + 1);
|
|
|
|
/* Must read after idx is updated */
|
|
- flags = qvirtio_readw(d, qts, vq->avail);
|
|
+ flags = qvirtio_readw(d, qts, vq->used);
|
|
avail_event = qvirtio_readw(d, qts, vq->used + 4 +
|
|
sizeof(struct vring_used_elem) * vq->size);
|
|
|
|
--
|
|
2.27.0
|
|
|