patch 'net: fix signed shift overflow in IPv6 checksum' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:10 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
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/29/26. 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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/844c2acfdab13da7785e3748ac12b40b788057dd
Thanks.
Luca Boccassi
---
>From 844c2acfdab13da7785e3748ac12b40b788057dd Mon Sep 17 00:00:00 2001
From: Aleksandr Khromov <haa at amicon.ru>
Date: Fri, 18 Sep 2026 10:47:29 +0300
Subject: [PATCH] net: fix signed shift overflow in IPv6 checksum
[ upstream commit bfbec118e9df73b35b375b668424c33ff36e62f2 ]
In rte_ipv6_phdr_cksum() the next header field, a uint8_t, is promoted to
a signed int before the left shift by 24. For protocol values >= 128
(for example IPPROTO_SCTP), proto << 24 does not fit in int, which is
undefined behaviour (signed left shift overflow) reported by UBSan:
rte_ip6.h: runtime error: left shift of 132 by 24 places cannot be
represented in type 'int'
Cast the operand to uint32_t before the shift so it is performed in
unsigned arithmetic. The resulting value is unchanged on two's
complement platforms. The same idiom is already used in RTE_IPV4().
Fixes: 6006818cfb26 ("net: new checksum functions")
Signed-off-by: Aleksandr Khromov <haa at amicon.ru>
---
.mailmap | 1 +
lib/net/rte_ip6.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/.mailmap b/.mailmap
index 59b8118a079..82083c21486 100644
--- a/.mailmap
+++ b/.mailmap
@@ -45,6 +45,7 @@ Alan Liu <zaoxingliu at gmail.com>
Alan Winkowski <walan at marvell.com>
Alejandro Lucero <alejandro.lucero at netronome.com>
Aleksander Gajewski <aleksanderx.gajewski at intel.com>
+Aleksandr Khromov <haa at amicon.ru>
Aleksandr Loktionov <aleksandr.loktionov at intel.com>
Aleksandr Miloshenko <a.miloshenko at f5.com>
Aleksey Baulin <aleksey.baulin at gmail.com>
diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h
index cb59e85c7e1..12823c9c652 100644
--- a/lib/net/rte_ip6.h
+++ b/lib/net/rte_ip6.h
@@ -566,7 +566,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
rte_be32_t proto; /* L4 protocol - top 3 bytes must be zero */
} psd_hdr;
- psd_hdr.proto = (uint32_t)(ipv6_hdr->proto << 24);
+ psd_hdr.proto = (uint32_t)ipv6_hdr->proto << 24;
if (ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG))
psd_hdr.len = 0;
else
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:58.215299930 +0000
+++ 0116-net-fix-signed-shift-overflow-in-IPv6-checksum.patch 2026-10-27 11:43:53.646063535 +0000
@@ -1 +1 @@
-From bfbec118e9df73b35b375b668424c33ff36e62f2 Mon Sep 17 00:00:00 2001
+From 844c2acfdab13da7785e3748ac12b40b788057dd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfbec118e9df73b35b375b668424c33ff36e62f2 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index 2e348c3bce..4506f9ccf8 100644
+index 59b8118a079..82083c21486 100644
@@ -31 +32 @@
-@@ -46,6 +46,7 @@ Alan Liu <zaoxingliu at gmail.com>
+@@ -45,6 +45,7 @@ Alan Liu <zaoxingliu at gmail.com>
@@ -40 +41 @@
-index d1abf1f5d5..14e0101c14 100644
+index cb59e85c7e1..12823c9c652 100644
More information about the stable
mailing list