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 1760145BB6 for ; Wed, 23 Oct 2024 23:17:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 123A643260; Wed, 23 Oct 2024 23:17:53 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id C9F1440261 for ; Wed, 23 Oct 2024 23:17:50 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4314c452180so9325315e9.0 for ; Wed, 23 Oct 2024 14:17:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718270; x=1730323070; 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=EUSwzbJSguEAaH/7WH7asM+ST00PsV2vzuF6RUah7Ng=; b=UEaCP6Tgu0H9QLQ1WPr8K3bQx9SqU00G7O6+EvgrJZshAHGnByAvZCZvUaRgd9huaU VO9WkH7g7NvjYpT8/2kA+MLg//NAkmsfOK2cxX4X8e633m/uYB4LnI4s3zrOPJLVc4r7 zdpHQNd2L1QtI9BKY+s7em0cNYLDdD8E2a5H3C5P7Jdrb5+5dJW7nAl5ZMQDaV2jfNUp KG5kkzNW8OPXiwMrO4/b1amzArND02q5v9WSF+yexaTZoaKYpR4KS9cWHQHXm63nV+Cs yGEb44+WwZMU8i5rnj8R6JcDqXLpNJotDNhTu8IPfMf2sfybVEnjxsgDjOWev+5mfWyI CkHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718270; x=1730323070; 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=EUSwzbJSguEAaH/7WH7asM+ST00PsV2vzuF6RUah7Ng=; b=i/jqXqJ9AnH+ZTWNxdTR1/Sz1h0ckuCPuNcUEHrNfkYYJoISed9Kg/EBQ6kpH2yRQe 4xle6AJ4RPMhYIyBtjC1/DZetfLREAYZ3e+t1jOruX7XjYzZfZKF+wtIUlDD1PATodeZ q83zKdZlkuIpQaAvCx97BJouXwg/TuW9QmFuaOIA7lqGP5T9SWuwjj/E3nO+36l/wnIE FKbR8t4K6Nc7dUfjxwrcyoBHpXGCR+Hu2hCRqXx3gLSQlYH1jXMP/8hk+6uROOdXLPQM JylOcoD3T4XJsuHXc3Owvj+JWfm7gDQN+H9vxyZtJYuKXQerHDBUllb4iEkgibtWh55c d/dA== X-Forwarded-Encrypted: i=1; AJvYcCVlK9f+FD1DB7ylTylYEyJlKO8cC0UOrEBc0YQgVpRPdS/1H4sJr//jipnOe005UJkB+JOoUII=@dpdk.org X-Gm-Message-State: AOJu0YwbvMZ/3CKBvXwjyZN5xXYYNZtqJjkqNOwPUDgVti9GPJKklt10 MHkGXeC91GZNkzW3M5FJ6hfezFICMR5qyAsPTKUPOpG5lx/9XTDY X-Google-Smtp-Source: AGHT+IFqyjSjXD69dqSYCRSWT5bzcQcdPpufXJBW1BCIHShE0WcER4tXUjFeLR5Z5qbE6IORHpYebg== X-Received: by 2002:a05:600c:3590:b0:431:55af:a220 with SMTP id 5b1f17b1804b1-43184459e7bmr25462615e9.12.1729718270298; Wed, 23 Oct 2024 14:17:50 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37ee0a37b5asm9732307f8f.10.2024.10.23.14.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:17:49 -0700 (PDT) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'net/nfp: fix double free in flow destroy' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:15:54 +0100 Message-ID: <20241023211704.1216956-14-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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.7 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/25/24. 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/8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Thanks. Luca Boccassi --- >From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:15 -0700 Subject: [PATCH] net/nfp: fix double free in flow destroy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ] Calling rte_free twice on same object will corrupt the heap. Warning is: In function 'nfp_pre_tun_table_check_del', inlined from 'nfp_flow_destroy' at ../drivers/net/nfp/flower/nfp_flower_flow.c:5143:9: ../drivers/net/nfp/flower/nfp_flower_flow.c:3830:9: error: pointer 'entry' used after 'rte_free' [-Werror=use-after-free] 3830 | rte_free(entry); | ^~~~~~~~~~~~~~~ ../drivers/net/nfp/flower/nfp_flower_flow.c:3825:9: note: call to 'rte_free' here 3825 | rte_free(entry); | ^~~~~~~~~~~~~~~ Bugzilla ID: 1555 Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/net/nfp/nfp_flow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c index 17c091ffa0..3746aa2d0f 100644 --- a/drivers/net/nfp/nfp_flow.c +++ b/drivers/net/nfp/nfp_flow.c @@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr, goto free_entry; } - rte_free(entry); rte_free(find_entry); priv->pre_tun_cnt--; -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.085777453 +0100 +++ 0014-net-nfp-fix-double-free-in-flow-destroy.patch 2024-10-23 22:16:40.447940718 +0100 @@ -1 +1 @@ -From fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 Mon Sep 17 00:00:00 2001 +From 8bd09aed9cf598b6b0088bdd70d4d8c0c00b908c Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit fae5c633522efd30b6cb2c7a1bdfeb7e19e2f369 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ - drivers/net/nfp/flower/nfp_flower_flow.c | 1 - + drivers/net/nfp/nfp_flow.c | 1 - @@ -36,5 +37,5 @@ -diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c -index 0078455658..64a0062c8b 100644 ---- a/drivers/net/nfp/flower/nfp_flower_flow.c -+++ b/drivers/net/nfp/flower/nfp_flower_flow.c -@@ -3822,7 +3822,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr, +diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c +index 17c091ffa0..3746aa2d0f 100644 +--- a/drivers/net/nfp/nfp_flow.c ++++ b/drivers/net/nfp/nfp_flow.c +@@ -3019,7 +3019,6 @@ nfp_pre_tun_table_check_del(struct nfp_flower_representor *repr,