!684 [sync] PR-680: fix CVE-2024-11614
From: @openeuler-sync-bot Reviewed-by: @jiangheng12 Signed-off-by: @jiangheng12
This commit is contained in:
commit
5dc5d3cba6
@ -0,0 +1,37 @@
|
|||||||
|
From e9c0ad133242c0bcb7801d2590e8bb5f7ac4ebfd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Olivier Matz <olivier.matz@6wind.com>
|
||||||
|
Date: Thu, 28 Nov 2024 12:09:56 +0100
|
||||||
|
Subject: net/virtio: fix Rx checksum calculation
|
||||||
|
|
||||||
|
If hdr->csum_start is larger than packet length, the len argument passed
|
||||||
|
to rte_raw_cksum_mbuf() overflows and causes a segmentation fault.
|
||||||
|
|
||||||
|
Ignore checksum computation in this case.
|
||||||
|
|
||||||
|
CVE-2024-11614
|
||||||
|
|
||||||
|
Fixes: ca7036b4af3a ("vhost: fix offload flags in Rx path")
|
||||||
|
|
||||||
|
Signed-off-by: Maxime Gouin <maxime.gouin@6wind.com>
|
||||||
|
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
|
||||||
|
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
|
||||||
|
---
|
||||||
|
lib/vhost/virtio_net.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
|
||||||
|
index 9f74a3c997..5f446eaabf 100644
|
||||||
|
--- a/lib/vhost/virtio_net.c
|
||||||
|
+++ b/lib/vhost/virtio_net.c
|
||||||
|
@@ -2261,6 +2261,9 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m,
|
||||||
|
*/
|
||||||
|
uint16_t csum = 0, off;
|
||||||
|
|
||||||
|
+ if (hdr->csum_start >= rte_pktmbuf_pkt_len(m))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
if (rte_raw_cksum_mbuf(m, hdr->csum_start,
|
||||||
|
rte_pktmbuf_pkt_len(m) - hdr->csum_start, &csum) < 0)
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
cgit v1.2.3
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: dpdk
|
Name: dpdk
|
||||||
Version: 21.11
|
Version: 21.11
|
||||||
Release: 80
|
Release: 81
|
||||||
Packager: packaging@6wind.com
|
Packager: packaging@6wind.com
|
||||||
URL: http://dpdk.org
|
URL: http://dpdk.org
|
||||||
%global source_version 21.11
|
%global source_version 21.11
|
||||||
@ -519,6 +519,7 @@ Patch9482: 0482-af_xdp-del-XDP_USE_SG-and-XDP_PKT_CONTD-definition.patch
|
|||||||
Patch9483: 0483-af_xdp-fix-mbuf-ol_flags-not-init.patch
|
Patch9483: 0483-af_xdp-fix-mbuf-ol_flags-not-init.patch
|
||||||
Patch9484: 0484-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch
|
Patch9484: 0484-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.patch
|
||||||
Patch9485: 0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch
|
Patch9485: 0485-net-af_xdp-fix-getsockopt-ENOTSOCK-error.patch
|
||||||
|
Patch9486: 0486-CVE-2024-11614-net-virtio-fix-Rx-checksum-calculation.patch
|
||||||
|
|
||||||
Summary: Data Plane Development Kit core
|
Summary: Data Plane Development Kit core
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -686,6 +687,9 @@ fi
|
|||||||
/usr/sbin/depmod
|
/usr/sbin/depmod
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 24 2024 jiangheng <jiangheng14@huawei.com> - 21.11-81
|
||||||
|
- net/virtio: fix Rx checksum calculation
|
||||||
|
|
||||||
* Wed Dec 18 2024 chendexi <chendexi@kylinos.cn> - 21.11-80
|
* Wed Dec 18 2024 chendexi <chendexi@kylinos.cn> - 21.11-80
|
||||||
- Change %post script to %posttrans.
|
- Change %post script to %posttrans.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user