patches for DPDK stable branches
 help / color / mirror / Atom feed
* patch 'vhost: fix virtqueue use after free on NUMA reallocation' has been queued to stable release 19.11.14
@ 2022-11-11 11:38 christian.ehrhardt
  2022-11-11 11:38 ` patch 'net: accept unaligned data in checksum routines' " christian.ehrhardt
                   ` (45 more replies)
  0 siblings, 46 replies; 47+ messages in thread
From: christian.ehrhardt @ 2022-11-11 11:38 UTC (permalink / raw)
  To: David Marchand; +Cc: Maxime Coquelin, dpdk stable

Hi,

FYI, your patch has been queued to stable release 19.11.14

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/18/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/f656287344ae0d29b322688095c1ee638f28675b

Thanks.

Christian Ehrhardt <christian.ehrhardt@canonical.com>

---
From f656287344ae0d29b322688095c1ee638f28675b Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand@redhat.com>
Date: Mon, 25 Jul 2022 22:32:03 +0200
Subject: [PATCH] vhost: fix virtqueue use after free on NUMA reallocation

[ upstream commit 0b2a2ca35037d6a5168f0832c11d9858b8ae946a ]

translate_ring_addresses (via numa_realloc) may change a virtio device and
virtio queue.
The virtqueue object must be refreshed before accessing the lock.

Fixes: 04c27cb673b9 ("vhost: fix unsafe vring addresses modifications")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/librte_vhost/vhost_user.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index af44d1e69c..76ce6cb11a 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2389,6 +2389,7 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,
 			if (is_vring_iotlb(dev, vq, imsg)) {
 				rte_spinlock_lock(&vq->access_lock);
 				*pdev = dev = translate_ring_addresses(dev, i);
+				vq = dev->virtqueue[i];
 				rte_spinlock_unlock(&vq->access_lock);
 			}
 		}
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 12:35:04.846725606 +0100
+++ 0001-vhost-fix-virtqueue-use-after-free-on-NUMA-reallocat.patch	2022-11-11 12:35:04.697191643 +0100
@@ -1 +1 @@
-From 0b2a2ca35037d6a5168f0832c11d9858b8ae946a Mon Sep 17 00:00:00 2001
+From f656287344ae0d29b322688095c1ee638f28675b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 0b2a2ca35037d6a5168f0832c11d9858b8ae946a ]
+
@@ -11 +12,0 @@
-Cc: stable@dpdk.org
@@ -16 +17 @@
- lib/vhost/vhost_user.c | 1 +
+ lib/librte_vhost/vhost_user.c | 1 +
@@ -19,5 +20,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 4ad28bac45..91d40e32fc 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2596,6 +2596,7 @@ vhost_user_iotlb_msg(struct virtio_net **pdev,
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index af44d1e69c..76ce6cb11a 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2389,6 +2389,7 @@ vhost_user_iotlb_msg(struct virtio_net **pdev, struct VhostUserMsg *msg,

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2022-11-11 11:41 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 11:38 patch 'vhost: fix virtqueue use after free on NUMA reallocation' has been queued to stable release 19.11.14 christian.ehrhardt
2022-11-11 11:38 ` patch 'net: accept unaligned data in checksum routines' " christian.ehrhardt
2022-11-11 11:38 ` patch 'app/testpmd: restore ixgbe bypass commands' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/bonding: fix array overflow in Rx burst' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/bonding: fix double slave link status query' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/nfp: improve HW info header log readability' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/mvneta: fix build with GCC 12' " christian.ehrhardt
2022-11-11 11:38 ` patch 'malloc: fix storage size for some allocations' " christian.ehrhardt
2022-11-11 11:38 ` patch 'event/sw: fix device name in dump' " christian.ehrhardt
2022-11-11 11:38 ` patch 'eventdev/eth_tx: add spinlock for adapter start/stop' " christian.ehrhardt
2022-11-11 11:38 ` patch 'eventdev/eth_tx: fix adapter stop' " christian.ehrhardt
2022-11-11 11:38 ` patch 'test/ipsec: skip if no compatible device' " christian.ehrhardt
2022-11-11 11:38 ` patch 'test/crypto: fix debug messages' " christian.ehrhardt
2022-11-11 11:38 ` patch 'test/ipsec: fix build with GCC 12' " christian.ehrhardt
2022-11-11 11:38 ` patch 'ipsec: " christian.ehrhardt
2022-11-11 11:38 ` patch 'crypto/qat: " christian.ehrhardt
2022-11-11 11:38 ` patch 'eventdev: fix name of Rx conf type in documentation' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/i40e: fix VF representor release' " christian.ehrhardt
2022-11-11 11:38 ` patch 'common/iavf: avoid copy in async mode' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/ice/base: fix media type of PHY 10G SFI C2C' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/ice/base: fix array overflow in add switch recipe' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/virtio: fix crash when configured twice' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/mlx4: fix Verbs FD leak in secondary process' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/mlx5: fix meter profile delete after disable' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/ice: check illegal packet sizes' " christian.ehrhardt
2022-11-11 11:38 ` patch 'common/sfc_efx/base: fix maximum Tx data count' " christian.ehrhardt
2022-11-11 11:38 ` patch 'examples/vm_power_manager: use safe list iterator' " christian.ehrhardt
2022-11-11 11:38 ` patch 'gro: fix chain index for more than 2 packets' " christian.ehrhardt
2022-11-11 11:38 ` patch 'timer: fix stopping all timers' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/qede/base: fix 32-bit build with GCC 12' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/tap: fix overflow of network interface index' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/memif: fix crash with different number of Rx/Tx queues' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/hns3: fix crash when secondary process access FW' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/bonding: fix Tx hash for TCP' " christian.ehrhardt
2022-11-11 11:38 ` patch 'eal: fix data race in multi-process support' " christian.ehrhardt
2022-11-11 11:38 ` patch 'pdump: do not allow enable/disable in primary process' " christian.ehrhardt
2022-11-11 11:38 ` patch 'event/sw: fix flow ID init in self test' " christian.ehrhardt
2022-11-11 11:38 ` patch 'event/sw: fix log " christian.ehrhardt
2022-11-11 11:38 ` patch 'eventdev/eth_tx: fix queue delete' " christian.ehrhardt
2022-11-11 11:38 ` patch 'license: fix paths' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/bonding: fix descriptor limit reporting' " christian.ehrhardt
2022-11-11 11:38 ` patch 'net/ixgbe: fix broadcast Rx on VF after promisc removal' " christian.ehrhardt
2022-11-11 11:39 ` patch 'net/ixgbe: fix unexpected VLAN Rx in promisc mode on VF' " christian.ehrhardt
2022-11-11 11:39 ` patch 'examples/l2fwd-crypto: fix typo in error message' " christian.ehrhardt
2022-11-11 11:39 ` patch 'test/crypto: fix wireless auth digest segment' " christian.ehrhardt
2022-11-11 11:39 ` patch 'test/crypto: fix PDCP vectors' " christian.ehrhardt
2022-11-11 11:39 ` patch 'crypto/qat: fix null hash algorithm digest size' " christian.ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).