[dpdk-stable] patch 'net: check segment pointer in raw checksum processing' has been queued to LTS release 18.11.11

Kevin Traynor ktraynor at redhat.com
Thu Nov 5 13:40:05 CET 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.11

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/10/20. 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/kevintraynor/dpdk-stable-queue

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

Thanks.

Kevin.

---
>From b3aabfa59d6e71962b72892e7e704f661d7d01e3 Mon Sep 17 00:00:00 2001
From: Chas Williams <3chas3 at gmail.com>
Date: Thu, 1 Oct 2020 06:22:44 -0400
Subject: [PATCH] net: check segment pointer in raw checksum processing

[ upstream commit d98b0fc1af6c3c752304f3910da1d97a57ddd53b ]

If the overall pkt_len and segment lengths are out of agreement,
it is possible for the seg to be NULL after the loop. Add assert
to check this condition in debug builds. Otherwise, return failure.

Fixes: c442fed81bb9 ("net: add function to calculate checksum in mbuf")

Signed-off-by: Chas Williams <3chas3 at gmail.com>
---
 lib/librte_net/rte_ip.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index a589a702af..0370b4be60 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -218,4 +218,7 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,
 		off -= seglen;
 	}
+	RTE_ASSERT(seg != NULL);
+	if (seg == NULL)
+		return -1;
 	seglen -= off;
 	buf = rte_pktmbuf_mtod_offset(seg, const char *, off);
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-05 12:38:55.510488177 +0000
+++ 0058-net-check-segment-pointer-in-raw-checksum-processing.patch	2020-11-05 12:38:54.257896033 +0000
@@ -1 +1 @@
-From d98b0fc1af6c3c752304f3910da1d97a57ddd53b Mon Sep 17 00:00:00 2001
+From b3aabfa59d6e71962b72892e7e704f661d7d01e3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d98b0fc1af6c3c752304f3910da1d97a57ddd53b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index bb55ebb6fa..8382d0fac7 100644
+index a589a702af..0370b4be60 100644
@@ -22 +23 @@
-@@ -226,4 +226,7 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,
+@@ -218,4 +218,7 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,



More information about the stable mailing list