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 74A75A0C41 for ; Tue, 30 Nov 2021 17:40:40 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F0FF410F7; Tue, 30 Nov 2021 17:40:40 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 36017410F7 for ; Tue, 30 Nov 2021 17:40:39 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1BB9D3F1B1 for ; Tue, 30 Nov 2021 16:40:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290439; bh=mWv8+yQVzSJq5CVbqM2VfL9kPduPHxw4mT4O2rFZJDg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pVAz6JiA5iwec7P1eJXb53/CrQoLFGOcgxdTGItNhOhu+oy1uhoEdVQ+g2LXioEte EmxiPUWbEXErDLa7SJPP2aHhic3gRT+joxEYUaHCu4c/NyATwB3N9bJxRl8my8Rz6m V6u1apDK9FNwfIiHU8sC9MCJwpaynMKAQ/lTb/u0H+48f6Sml9wnTi1hhLu0+wuNdR BTGeH2Lk3DxLwbpX5Tlq98Bg06eV14jU4Fsk6A37bITPi+RUJkIY/6jjHTaQL5y4xB NHZ/YMXRiTmHZmdiTyTI95Dwz19Xoo/MOBgQJk0z+j68RQAtPNwtXEP/ecwhgPnmn9 0UQepWMJA/afw== Received: by mail-ed1-f70.google.com with SMTP id i19-20020a05640242d300b003e7d13ebeedso17450024edc.7 for ; Tue, 30 Nov 2021 08:40:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mWv8+yQVzSJq5CVbqM2VfL9kPduPHxw4mT4O2rFZJDg=; b=J/te1wFMgc/Ch7THhYGAYelwJxaEKBF2hLeP+sSxMr161tw3VT83QdR3NMEo1fyjLs Iiv3ZqN5XqFMFnhANvspdB3imvQ+3/3uZBLtj5jhk9NpkR78B9Voa40zCCpx8hRXcSAX CtvM7Gyr6s8Ru9erSkIs5yt+7Mmoyw9FKESgxhAPR4vraX7qhagdjBsdMsBc5ZnZdZDu 9P8+WZa8CFMG3iP+NETKyhmx+eHPXxuX52cuexU05PVJnHijq+T5Fw7xBCu7wbpuGdOx SV5qtjTrponjRQZU3ESP3fwCnoGAxJEhuSirJA0wNXUBXOg3tBx9hFG/4v7P2c048UGb 2Dog== X-Gm-Message-State: AOAM531GBik/fsZUrr7ZWKv0JkGoLCW67F+n3WR1zRHqyBwSaOoB6m3E PDRmC157SwHgIx8O0zeJM3lDUQ0w58SQ+OcTrAvUGLnwoT+W0HXuK6zONoNgDdcnffj2MCjhVBw 2JK8W1T5KVplIA+oWOPW0uBB7 X-Received: by 2002:a50:da48:: with SMTP id a8mr129384edk.146.1638290438633; Tue, 30 Nov 2021 08:40:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQo+V03ihR2Q/Icec6tGh3/N66D/MXiwSVG8Mj7PpMpXkxSjt/GSQuGl59AmlrlISVZYxioA== X-Received: by 2002:a50:da48:: with SMTP id a8mr129357edk.146.1638290438502; Tue, 30 Nov 2021 08:40:38 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id yd20sm9297785ejb.47.2021.11.30.08.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:40:38 -0800 (PST) From: christian.ehrhardt@canonical.com To: Viacheslav Ovsiienko Cc: Ori Kam , dpdk stable Subject: patch 'app/testpmd: fix hex string parser in flow commands' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:50 +0100 Message-Id: <20211130163605.2460997-86-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.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 19.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 December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/84d8ca035813338a44fbd5e0ec3f16a6894a9d8d Thanks. Christian Ehrhardt --- >From 84d8ca035813338a44fbd5e0ec3f16a6894a9d8d Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Wed, 13 Oct 2021 21:45:15 +0300 Subject: [PATCH] app/testpmd: fix hex string parser in flow commands [ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ] The hexadecimal string parser does not check the target field buffer size, buffer overflow happens and might cause the application failure (segmentation fault is observed usually). Fixes: 169a9fed1f4c ("app/testpmd: fix hex string parser support for flow API") Signed-off-by: Viacheslav Ovsiienko Acked-by: Ori Kam --- app/test-pmd/cmdline_flow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 0b76f7ef21..4d99ae518d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -5361,10 +5361,13 @@ parse_hex(struct context *ctx, const struct token *token, hexlen -= 2; } if (hexlen > length) - return -1; + goto error; ret = parse_hex_string(str, hex_tmp, &hexlen); if (ret < 0) goto error; + /* Check the converted binary fits into data buffer. */ + if (hexlen > size) + goto error; /* Let parse_int() fill length information first. */ ret = snprintf(tmp, sizeof(tmp), "%u", hexlen); if (ret < 0) -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:10.959422286 +0100 +++ 0086-app-testpmd-fix-hex-string-parser-in-flow-commands.patch 2021-11-30 16:50:05.878874175 +0100 @@ -1 +1 @@ -From a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 Mon Sep 17 00:00:00 2001 +From 84d8ca035813338a44fbd5e0ec3f16a6894a9d8d Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a2b97fb7f5b11dcf5e810e13a0da1a0f111975e6 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 6d9e3d5c42..a90822b660 100644 +index 0b76f7ef21..4d99ae518d 100644 @@ -24 +25 @@ -@@ -7381,10 +7381,13 @@ parse_hex(struct context *ctx, const struct token *token, +@@ -5361,10 +5361,13 @@ parse_hex(struct context *ctx, const struct token *token,