All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)" <devanshp@cisco.com>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][wrynose][PATCH] iperf3: fix CVE-2026-102253
Date: Wed,  2 Dec 2026 00:49:47 -0800	[thread overview]
Message-ID: <20261202084947.3900968-1-devanshp@cisco.com> (raw)

From: Devansh Patel <devanshp@cisco.com>

This patch applies the upstream 3.22 backport for CVE-2026-102253.
The upstream fix commit is referenced in [1], the public CVE advisory
is referenced in [2], and the CVE record is referenced in [3].

[1] https://github.com/esnet/iperf/commit/a25378f8cbbaa7b3db5674ca3dcc19658ae65da3
[2] https://www.vulncheck.com/advisories/iperf3-udp-receive-worker-infinite-loop-dos
[3] https://www.cve.org/CVERecord?id=CVE-2026-102253

Signed-off-by: Devansh Patel <devanshp@cisco.com>
---
 .../iperf3/iperf3/CVE-2026-102253.patch       | 63 +++++++++++++++++++
 .../recipes-benchmark/iperf3/iperf3_3.21.bb   |  1 +
 2 files changed, 64 insertions(+)
 create mode 100644 meta-oe/recipes-benchmark/iperf3/iperf3/CVE-2026-102253.patch

diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3/CVE-2026-102253.patch b/meta-oe/recipes-benchmark/iperf3/iperf3/CVE-2026-102253.patch
new file mode 100644
index 0000000..8c7b432
--- /dev/null
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3/CVE-2026-102253.patch
@@ -0,0 +1,63 @@
+From ffae74ef46894cb0a15ccb0dbd75422dc5c42e83 Mon Sep 17 00:00:00 2001
+From: swlars <swlarsen@es.net>
+Date: Tue, 4 Aug 2026 19:38:16 +0000
+Subject: [PATCH] For UDP, check that blksize and dgram_size are greater than 0
+ to avoid a loop.
+
+Reported by Ravindu Lakmina Munaweera (Github: @Ravi-lk)
+
+(CVE-2026-102253)
+
+CVE: CVE-2026-102253
+Upstream-Status: Backport [https://github.com/esnet/iperf/commit/a25378f8cbbaa7b3db5674ca3dcc19658ae65da3]
+
+Backport Changes:
+- The unchanged upstream cherry-pick conflicts in get_parameters():
+  iperf3 3.21 lacks the validation block introduced by prerequisite
+  494dd377eca4689672becdf06a85158557db1586:
+  https://github.com/esnet/iperf/commit/494dd377eca4689672becdf06a85158557db1586
+  Fold only its UDP block-size validation, with the CVE correction,
+  after cJSON_Delete(j). Keep the upstream added lines unchanged.
+  Omit the unrelated JSON validation, TCP checks and GSO recalculation
+  from the prerequisite. No files from the CVE fix are omitted.
+
+Signed-off-by: Devansh Patel <devanshp@cisco.com>
+---
+ src/iperf_api.c | 7 +++++++
+ src/iperf_udp.c | 5 +++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/src/iperf_api.c b/src/iperf_api.c
+index fb4273f..c5a922c 100644
+--- a/src/iperf_api.c
++++ b/src/iperf_api.c
+@@ -2662,6 +2662,13 @@ get_parameters(struct iperf_test *test)
+ 	    cJSON_AddNumberToObject(test->json_start, "target_bitrate", test->settings->rate);
+ 	cJSON_Delete(j);
+ 
++        // Check that UDP blksize > Min && < Max
++        if (test->protocol->id == Pudp &&
++                (test->settings->blksize < MIN_UDP_BLOCKSIZE || test->settings->blksize > MAX_UDP_BLOCKSIZE)) {
++            i_errno = IEUDPBLOCKSIZE;
++            return -1;
++        }
++
+     /* Ensure that the client does not request to run longer than the server's configured max */
+     if ((test->max_server_duration > 0) && (((test->duration + test->omit) > test->max_server_duration) || (test->duration == 0))) {
+         i_errno = IEMAXSERVERTESTDURATIONEXCEEDED;
+diff --git a/src/iperf_udp.c b/src/iperf_udp.c
+index 393836c..eae3850 100644
+--- a/src/iperf_udp.c
++++ b/src/iperf_udp.c
+@@ -104,6 +104,11 @@ iperf_udp_recv(struct iperf_stream *sp)
+     if (r <= 0)
+         return r;
+ 
++    // Check dgram_sz is greater than 0
++    if (dgram_sz <= 0){
++        return -1;
++    }
++
+     /* Only count bytes received while we're in the correct state. */
+     if (test->state == TEST_RUNNING) {
+ 
diff --git a/meta-oe/recipes-benchmark/iperf3/iperf3_3.21.bb b/meta-oe/recipes-benchmark/iperf3/iperf3_3.21.bb
index de26655..1abe6d7 100644
--- a/meta-oe/recipes-benchmark/iperf3/iperf3_3.21.bb
+++ b/meta-oe/recipes-benchmark/iperf3/iperf3_3.21.bb
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f2eb355b6d3b9d63b6b7a861cdc62440"
 SRC_URI = "git://github.com/esnet/iperf.git;branch=master;protocol=https;tag=${PV} \
            file://0002-Remove-pg-from-profile_CFLAGS.patch \
            file://0001-configure.ac-check-for-CPP-prog.patch \
+           file://CVE-2026-102253.patch \
           "
 
 SRCREV = "d39cf41526626b4e5a130f115d931cd6cbdffc19"
-- 
2.35.6


                 reply	other threads:[~2026-12-02  8:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202084947.3900968-1-devanshp@cisco.com \
    --to=devanshp@cisco.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.