fix CVE-2024-11614
(cherry picked from commit 0a6798b3ea9bc4e9992610381437a61aaeefed32)
This commit is contained in:
parent
d20bc65473
commit
3cd268223a
@ -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
|
||||
Version: 21.11
|
||||
Release: 80
|
||||
Release: 81
|
||||
Packager: packaging@6wind.com
|
||||
URL: http://dpdk.org
|
||||
%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
|
||||
Patch9484: 0484-bus-pci-fix-UIO-resource-mapping-in-secondary-proces.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
|
||||
Group: System Environment/Libraries
|
||||
@ -686,6 +687,9 @@ fi
|
||||
/usr/sbin/depmod
|
||||
|
||||
%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
|
||||
- Change %post script to %posttrans.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user