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 36667A0540 for ; Thu, 7 Jul 2022 09:55:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30FE74113C; Thu, 7 Jul 2022 09:55:38 +0200 (CEST) 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 1C900406B4 for ; Thu, 7 Jul 2022 09:55:36 +0200 (CEST) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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 DFFDE3F1FD for ; Thu, 7 Jul 2022 07:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180535; bh=mq92VJgy+pyCeCll16GEOheJCm41q/ZNBA8xf3ABROg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=J5IaC7HBel2PwrHQWBpcWymYx3+w19AB7fzkOz/gIwbm2ESWy5EOXO+8AYKmAs0BC Bcr1PEbNeLB1wSAJQ+JBRiVFsQelnl7E8PcweyC5g4l87Ky782ri5l7rDFtduRs7LQ sIY8mOWPNzx+BGmbB8bxUaDkA58kGxPrHF5qBXgKRLUeEPbgPB1KnYQY0+tjq26rBA 07yW+aQ7tVxiFeJDZWXwTvYdKkOjigmG0qg/6DTkk9mMGkPfcqKQfc7AQG1yYNo4tv r+serQ96PiVoafMXaOc9c7hV7SkL0zxkoLPWL9J1qZl2VW3+MH4fXjhfeQeJaEhnro vU95f+uPQW67w== Received: by mail-ed1-f69.google.com with SMTP id o11-20020a056402438b00b0043676efd75dso13499028edc.16 for ; Thu, 07 Jul 2022 00:55:35 -0700 (PDT) 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=mq92VJgy+pyCeCll16GEOheJCm41q/ZNBA8xf3ABROg=; b=2Pdi8ULIgbQ+Rf8uOvuJjjlTZChlgRkKfNTGHFFL6W7Q5qlmIveIT3zjeq34JIsnEn 7fMGKOEH1lNfxxlDTN2va21YGI1va9kdzMeQ7eHD7nR0HY4KvznUanMkvTpHjzTeBPJ8 uaTQl7cQthrHhLvYcEfpFeMPTfgjkPShRKtov0VvfzopSTRbqJKYefP8urkHdHvKSDsg q+9d66WUeKdxO28CI8Wf7ebVdBFbpn+fKtHvWb38zKDRl2O7AWpEQ0CEdqwjLGroWEzo ahYEOrRHok7L4wbEZ/rWrMBFK/ApiLEfK59vjdcCCzuYY7oG+Lr3+1zqJnFrcm2Uw9Qd AIWw== X-Gm-Message-State: AJIora+Wnnvk+FFmWGn+iXfuiRPTTsERMwvSpvxBcBLFU6pdbJ/BvqjC 6eGBKvtYTEvT7lbWygFI/myojUf0Qo955F8y/SD2LzbcJ78v9vRgamTqWeqNlpjZIJzBqG3xk+v QAqkoTwFKlTi4jMrJuNQbSRfC X-Received: by 2002:a05:6402:5192:b0:435:b3c3:af89 with SMTP id q18-20020a056402519200b00435b3c3af89mr59715852edd.390.1657180535146; Thu, 07 Jul 2022 00:55:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vXRdHgYo2TD0dBLxNScMjmSy5yRCoaRI5eaC/O+hijkIvTYx7HgKzXYE+oicqA6XKvRhs+3A== X-Received: by 2002:a05:6402:5192:b0:435:b3c3:af89 with SMTP id q18-20020a056402519200b00435b3c3af89mr59715842edd.390.1657180534987; Thu, 07 Jul 2022 00:55:34 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id cq9-20020a056402220900b0043a6df72c11sm7857527edb.63.2022.07.07.00.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:55:34 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Vladimir Medvedkin Cc: Cristian Dumitrescu , dpdk stable Subject: patch 'test/table: fix buffer overflow on lpm entry' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:00 +0200 Message-Id: <20220707075522.194223-5-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-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.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/f921474814ce2170eadaf2b62448f5ae19b3ef85 Thanks. Christian Ehrhardt --- >From f921474814ce2170eadaf2b62448f5ae19b3ef85 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Thu, 21 Apr 2022 17:35:27 +0000 Subject: [PATCH] test/table: fix buffer overflow on lpm entry [ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ] This patch fixes stack buffer overflow reported by ASan. Bugzilla ID: 820 Fixes: 5205954791cb ("app/test: packet framework unit tests") Signed-off-by: Vladimir Medvedkin Acked-by: Cristian Dumitrescu --- app/test/test_table_tables.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test/test_table_tables.c b/app/test/test_table_tables.c index 4ff6ab16aa..494fb6ffaa 100644 --- a/app/test/test_table_tables.c +++ b/app/test/test_table_tables.c @@ -290,10 +290,10 @@ test_table_lpm(void) struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX]; void *table; char *entries[RTE_PORT_IN_BURST_SIZE_MAX]; - char entry; + uint64_t entry; void *entry_ptr; int key_found; - uint32_t entry_size = 1; + uint32_t entry_size = sizeof(entry); /* Initialize params and create tables */ struct rte_table_lpm_params lpm_params = { @@ -355,7 +355,7 @@ test_table_lpm(void) struct rte_table_lpm_key lpm_key; lpm_key.ip = 0xadadadad; - table = rte_table_lpm_ops.f_create(&lpm_params, 0, 1); + table = rte_table_lpm_ops.f_create(&lpm_params, 0, entry_size); if (table == NULL) return -9; @@ -456,10 +456,10 @@ test_table_lpm_ipv6(void) struct rte_mbuf *mbufs[RTE_PORT_IN_BURST_SIZE_MAX]; void *table; char *entries[RTE_PORT_IN_BURST_SIZE_MAX]; - char entry; + uint64_t entry; void *entry_ptr; int key_found; - uint32_t entry_size = 1; + uint32_t entry_size = sizeof(entry); /* Initialize params and create tables */ struct rte_table_lpm_ipv6_params lpm_params = { -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:11.426468404 +0200 +++ 0005-test-table-fix-buffer-overflow-on-lpm-entry.patch 2022-07-07 09:54:10.785823505 +0200 @@ -1 +1 @@ -From a6699a6eb22a763ad4bc7498ca53cf89ab9917dd Mon Sep 17 00:00:00 2001 +From f921474814ce2170eadaf2b62448f5ae19b3ef85 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a6699a6eb22a763ad4bc7498ca53cf89ab9917dd ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index d5c5a426bc..010dd5a794 100644 +index 4ff6ab16aa..494fb6ffaa 100644 @@ -22 +23 @@ -@@ -292,10 +292,10 @@ test_table_lpm(void) +@@ -290,10 +290,10 @@ test_table_lpm(void) @@ -35 +36 @@ -@@ -357,7 +357,7 @@ test_table_lpm(void) +@@ -355,7 +355,7 @@ test_table_lpm(void) @@ -44 +45 @@ -@@ -458,10 +458,10 @@ test_table_lpm_ipv6(void) +@@ -456,10 +456,10 @@ test_table_lpm_ipv6(void)