diff --git a/0486-CVE-2024-11614-net-virtio-fix-Rx-checksum-calculation.patch b/0486-CVE-2024-11614-net-virtio-fix-Rx-checksum-calculation.patch new file mode 100644 index 0000000000000000000000000000000000000000..3cd7a83694bcf162cbd35bfecb0785250f591bdd --- /dev/null +++ b/0486-CVE-2024-11614-net-virtio-fix-Rx-checksum-calculation.patch @@ -0,0 +1,37 @@ +From e9c0ad133242c0bcb7801d2590e8bb5f7ac4ebfd Mon Sep 17 00:00:00 2001 +From: Olivier Matz +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 +Signed-off-by: Olivier Matz +Reviewed-by: Maxime Coquelin +--- + 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 diff --git a/dpdk.spec b/dpdk.spec index e2cf86920a6305fe4e4195b758ca6d9003b58c31..b92360c11f2add3df3380d506b8af0d96235cc28 100644 --- a/dpdk.spec +++ b/dpdk.spec @@ -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 - 21.11-81 +- net/virtio: fix Rx checksum calculation + * Wed Dec 18 2024 chendexi - 21.11-80 - Change %post script to %posttrans.