patch 'net: fix signed shift overflow in IPv6 checksum' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:01:06 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

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

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

Thanks.

Kevin

---
>From a4d8d0c19b0029bec7cc50e8948144a92bbcf580 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 1ae256d4eb..64ec764db8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -46,4 +46,5 @@ 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>
diff --git a/lib/net/rte_ip6.h b/lib/net/rte_ip6.h
index d1abf1f5d5..14e0101c14 100644
--- a/lib/net/rte_ip6.h
+++ b/lib/net/rte_ip6.h
@@ -567,5 +567,5 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags)
 	} 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;
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:43.266020175 +0000
+++ 0140-net-fix-signed-shift-overflow-in-IPv6-checksum.patch	2026-12-03 12:52:39.133650079 +0000
@@ -1 +1 @@
-From bfbec118e9df73b35b375b668424c33ff36e62f2 Mon Sep 17 00:00:00 2001
+From a4d8d0c19b0029bec7cc50e8948144a92bbcf580 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 1ae256d4eb..64ec764db8 100644
@@ -31 +32 @@
-@@ -47,4 +47,5 @@ Alan Winkowski <walan at marvell.com>
+@@ -46,4 +46,5 @@ Alan Winkowski <walan at marvell.com>



More information about the stable mailing list