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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:44:54 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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.

Thanks.

Luca Boccassi

---
>From 501b711ce2d8f2b688b7a857d57a242e453fe30e 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 0897da744c..d34c0611f0 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -225,6 +225,9 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,
 			break;
 		off -= seglen;
 	}
+	RTE_ASSERT(seg != NULL);
+	if (seg == NULL)
+		return -1;
 	seglen -= off;
 	buf = rte_pktmbuf_mtod_offset(seg, const char *, off);
 	if (seglen >= len) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:15.933488722 +0000
+++ 0135-net-check-segment-pointer-in-raw-checksum-processing.patch	2020-10-28 10:35:11.704832968 +0000
@@ -1,14 +1,15 @@
-From d98b0fc1af6c3c752304f3910da1d97a57ddd53b Mon Sep 17 00:00:00 2001
+From 501b711ce2d8f2b688b7a857d57a242e453fe30e 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")
-Cc: stable at dpdk.org
 
 Signed-off-by: Chas Williams <3chas3 at gmail.com>
 ---
@@ -16,7 +17,7 @@
  1 file changed, 3 insertions(+)
 
 diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
-index bb55ebb6fa..8382d0fac7 100644
+index 0897da744c..d34c0611f0 100644
 --- a/lib/librte_net/rte_ip.h
 +++ b/lib/librte_net/rte_ip.h
 @@ -225,6 +225,9 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len,


More information about the stable mailing list