From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A474F489EF for ; Mon, 27 Oct 2025 17:23:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9EA624069D; Mon, 27 Oct 2025 17:23:48 +0100 (CET) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id 5509840696 for ; Mon, 27 Oct 2025 17:23:46 +0100 (CET) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47118259fd8so36819935e9.3 for ; Mon, 27 Oct 2025 09:23:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582226; x=1762187026; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gBZQoBoYOfoQHcPox7IzxpcTAHr5+hVuh1z5/Dh3rg0=; b=VZIghYni1TMWD1Zh3cluOaUECDR7LnEQm4clpirLtQH8RTBoNiw+SciR63XiN3OpoG R+N7sUuSay1+waeGSn9p41vnpTHFwKaXuylID6f2s9wPrL0ypjOqC/XcgrFWsFedV4Ga Tb5QqMxX8EPoCW8D5VH/RDMKyigHkYQHYHVzwozzf1rgIXA6Ngjmg08AWAsPbS2CL6A+ FMmYl7DUVLkGzbOrBjv0EaVDXMl3dmuOGc5I+r55nvtZ8MJMJ2zZicXWytf8QtIGUvVd OmK440duCCXDsN77DBorpH1haR60Fg3h/wjNflMTRf/v9Fd2FI/3j7VpoS4dXk8cIj/2 zUww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582226; x=1762187026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state: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F4KK8zmUpWkWnOJT6w6ETikdyeOSqsEZjJWAGG7 C+uQXhuw== X-Google-Smtp-Source: AGHT+IFMv4CrMmbq+2bvKYkxByVjumzPwKcPBAjBT7ERSC6bZ+881vg8kU4jVSU+u5I5xisJTN7Ciw== X-Received: by 2002:a05:600c:474e:b0:46f:b42e:e367 with SMTP id 5b1f17b1804b1-47717e6c511mr1860135e9.41.1761582225873; Mon, 27 Oct 2025 09:23:45 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-475dd4cc596sm148405775e9.15.2025.10.27.09.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:23:45 -0700 (PDT) From: luca.boccassi@gmail.com To: Shai Brandes Cc: Amit Bernstein , Yosef Raisman , dpdk stable Subject: patch 'net/ena/base: fix unsafe memcpy on invalid memory' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:19:47 +0000 Message-ID: <20251027162001.3710450-69-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.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 10/29/25. 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/dc02906bd29022033d42eb96823010b852f4d100 Thanks. Luca Boccassi --- >From dc02906bd29022033d42eb96823010b852f4d100 Mon Sep 17 00:00:00 2001 From: Shai Brandes Date: Wed, 15 Oct 2025 15:12:30 +0300 Subject: [PATCH] net/ena/base: fix unsafe memcpy on invalid memory [ upstream commit b70db0912a6a181ecf513a4eef61153d1063c0ae ] The return status check was placed after a memcpy operation, which could result in copying from an invalid memory region if the feature fetch failed. Fixes: b68309be44c0 ("net/ena/base: update communication layer for the ENAv2") Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein Reviewed-by: Yosef Raisman --- drivers/net/ena/base/ena_com.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 98035f3cd4..4e22b5f563 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -2014,13 +2014,13 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev, } else { rc = ena_com_get_feature(ena_dev, &get_resp, ENA_ADMIN_MAX_QUEUES_NUM, 0); + if (rc) + return rc; + memcpy(&get_feat_ctx->max_queues, &get_resp.u.max_queue, sizeof(get_resp.u.max_queue)); ena_dev->tx_max_header_size = get_resp.u.max_queue.max_header_size; - - if (rc) - return rc; } rc = ena_com_get_feature(ena_dev, &get_resp, -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:37.305959051 +0000 +++ 0069-net-ena-base-fix-unsafe-memcpy-on-invalid-memory.patch 2025-10-27 15:54:34.843950754 +0000 @@ -1 +1 @@ -From b70db0912a6a181ecf513a4eef61153d1063c0ae Mon Sep 17 00:00:00 2001 +From dc02906bd29022033d42eb96823010b852f4d100 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b70db0912a6a181ecf513a4eef61153d1063c0ae ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index ede3c06139..f0936a6262 100644 +index 98035f3cd4..4e22b5f563 100644 @@ -24 +25 @@ -@@ -2453,13 +2453,13 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev, +@@ -2014,13 +2014,13 @@ int ena_com_get_dev_attr_feat(struct ena_com_dev *ena_dev,