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 7B28C4624E for ; Mon, 17 Feb 2025 18:08:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7250940289; Mon, 17 Feb 2025 18:08:24 +0100 (CET) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mails.dpdk.org (Postfix) with ESMTP id 765F3402BC for ; Mon, 17 Feb 2025 18:08:23 +0100 (CET) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4395dddb07dso47891545e9.2 for ; Mon, 17 Feb 2025 09:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812103; x=1740416903; 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=BWLW0JIvC//WsV7j+3pNVOuqePoCz2neEtPJrCKjJI0=; b=FHU54BOkcqTtIJe9N2WO5E79GQNvwd6kJZ5LGK48h2fbsmdQpIfeCm1e8nI3MBZqus 0m9TY2P9aZ5vD5BexTxwvCZtal6B9M3NdbX3Ez+J1GLRH2A6NTrTX6Iep8il3TSIMwSW HIS8xm61S1G6k1WwxOq00/HIhhh9iD75ZBVnPB5qARB3idBqhO9eUhWX40P+sEd5Eux8 bCwT/VWX3KCd7lgn0ab4vrjrq0Wk9PyC3R0VA3+ko9Fxwq4pR0wWsb0Wv/9KS+1r/vQa koGnHU5oT60T7TvbA2yBz1VJssKsy34WTSH3JxtEWHYDbVh09FpbM//8xdMpvhDNuVcd wS1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812103; x=1740416903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BWLW0JIvC//WsV7j+3pNVOuqePoCz2neEtPJrCKjJI0=; b=UraNhpZuaggG3PKg+Fe08hhQbhoJtiZ/XAxu4lYT0kRuTDrPV/bRhdg98JzefcRoIP 8Yb7uLN2jmkerl95R9MNKwh/fubCXCHYGGPy/WNv1OkGUqG2aPXtzqYOyMj+y3F/pv4O K1fgxiUu8KTXDGprbIGeN3+sdF1MI9ywt/fU2WYM7+ninB7yvHWCv4yhtBQgAQkvhjIp Bh59NzVFyWXgBGRRRHVfjvnxDjyDp4WhUSRygSZcfimurszYP9ME5Xa7ztgAKBUUTbsT GUPBS6B8HU+vHGilewRPN/hS8730jx6ICAvPq3Wv3McsrablbjSwD+Wgrif/TDONr6Zg AZzg== X-Gm-Message-State: AOJu0YwRmcNW0XlENPJYThyvDU3mY5JKFq18AkQXZvgfm8r66OWl1ugW vTqcpRUa3ipF0E76z60XGvr6vQU5SmJrdUXnaVGUN24nx31GSZjxgN/A8qBZ31wrSA== X-Gm-Gg: ASbGncvVjMYgM8CA+F1Y/SpjrmRuvf14NZbUKjzuBckvYRMyOVYPSdL/sjdkjgBgmbO G943SSzvrBQV9r+vLVhiHP9t3BmnYzuGUa8sF0ftsbu7i3HslR//DI9fdS6KD6qgGPt1BP94EY9 2CxRAqVZMrG5FAhIVy0FnhNFXt8IeFJW/6K9K/6bwxMJllS0Rs/CrcZq5tWYjCVd3/5XgT6gDc+ LSH/k14+gpXiXOnxrv7BzmCPtbYKdJc4D6XDuR8MncZX+cbJqRwaHTPH5DZd1i4/9KWi55gWp/m eba30A0j/yJcfW/BxvDi6w== X-Google-Smtp-Source: AGHT+IGWV6Cov8F29RYcgZhb3aa7TffCkeJe2TGJnQ7g1ItPC7MjL8OS4nnNqRmfYxxyMYHN51pNHA== X-Received: by 2002:a05:600c:1e11:b0:439:86fb:7326 with SMTP id 5b1f17b1804b1-43986fb7498mr29418715e9.22.1739812102813; Mon, 17 Feb 2025 09:08:22 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-439617ffa28sm124714595e9.14.2025.02.17.09.08.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:08:21 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'eal: fix devargs layers parsing out of bounds' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:38 +0000 Message-ID: <20250217170456.1068278-65-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/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/db68a74527720938c6288141da9869931b6255f9 Thanks. Luca Boccassi --- >From db68a74527720938c6288141da9869931b6255f9 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 5 Feb 2025 08:23:07 -0800 Subject: [PATCH] eal: fix devargs layers parsing out of bounds [ upstream commit 42f91490ebc97a816ea11ce9c995f455c169a77a ] The code for parsing layers in devargs could reference past the end of layers[] array on stack. Link: https://pvs-studio.com/en/blog/posts/cpp/1183/ Fixes: 9a1a9e4a2ddd ("devargs: support path value with global device syntax") Signed-off-by: Stephen Hemminger --- lib/eal/common/eal_common_devargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/eal/common/eal_common_devargs.c b/lib/eal/common/eal_common_devargs.c index fb5d0a293b..2f1515d7c9 100644 --- a/lib/eal/common/eal_common_devargs.c +++ b/lib/eal/common/eal_common_devargs.c @@ -88,7 +88,7 @@ rte_devargs_layers_parse(struct rte_devargs *devargs, s = devargs->data; while (s != NULL) { - if (nblayer > RTE_DIM(layers)) { + if (nblayer >= RTE_DIM(layers)) { ret = -E2BIG; goto get_out; } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:19.129918990 +0000 +++ 0065-eal-fix-devargs-layers-parsing-out-of-bounds.patch 2025-02-17 16:13:16.862441592 +0000 @@ -1 +1 @@ -From 42f91490ebc97a816ea11ce9c995f455c169a77a Mon Sep 17 00:00:00 2001 +From db68a74527720938c6288141da9869931b6255f9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 42f91490ebc97a816ea11ce9c995f455c169a77a ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index a64805b268..dd857fc839 100644 +index fb5d0a293b..2f1515d7c9 100644