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 7C730A0C4C for ; Mon, 12 Jul 2021 15:11:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 761D14069D; Mon, 12 Jul 2021 15:11:10 +0200 (CEST) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mails.dpdk.org (Postfix) with ESMTP id 1D31A4069D for ; Mon, 12 Jul 2021 15:11:09 +0200 (CEST) Received: by mail-wr1-f44.google.com with SMTP id p8so25557675wrr.1 for ; Mon, 12 Jul 2021 06:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ql6JwLUHp0qNvlLreSyh6jZOg3aXfIynrsOYw0FKK8o=; b=jximd0BwSzpwqXmkPXJtAtUXq1+tKcY2m1+ItQ6e157okctEmUFxMNtLOgOCW91Tkz Sr84aZ8unmpHDJ+Z4qO5eWCJKQfg99jFhhEcCpJzF2E+7fnSdkkdeoSNXoutpswMXRcu qcL1MFpSK3JO9pYB1V1FHpZOZotXKIp2ADlxHUgzNI4cUTwcTHHQv18gdMclbVFWugEf DilKxVMmBKsjs0qlArYpTCRsuZlPAjfauu2kry3sbXN/nLWFEXIiabcLSqYQHlPRjakt NvhyFounwUTmG+h+w/79phg+n4ATz06iXcpgo3VbeefyuwKXW+izQx6l/XaB1XJnwh0w UUMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ql6JwLUHp0qNvlLreSyh6jZOg3aXfIynrsOYw0FKK8o=; b=qhSQrGwVLE8CBxrt4totelymIB0KyGSfyyM/c4j/7aBH7uvNhUajg/+dnrXNsazfAv 7OSTyUSaAKqM8Wnp174DNJlVr4d3ealjX4iafX7f7ALnU0IcUuDoISJW2d/iA20sgwm/ 7H11X6idI/wPerAveejYJI2aheV+n4tWfLlY7cHeFGlzvQQ85g3iAmF3hZGM4XxgUGvS CGuHblWve4eCrnErTblLNn0gK9ntaufXfwF3oC/zZakANC/6mPeDIe8U3o2aQhBJUbl9 JbzrmRppOR5YRou0dX1npiW7lpZGZl6R9c7aCEEiF/ZvSRpIHumN+LOLbu6EFd4zOMam eLCA== X-Gm-Message-State: AOAM5335mnL76hk5Dmf4E7BEJ2iA2S0ma02vgF0C1P72NQD/qZlSNv6Y shuMuZmh247/6fzChvLq3sk= X-Google-Smtp-Source: ABdhPJyb5ZCxplsxBq9PrdPAeG8sevSi8QUVo1yOsDCxhxERBIOk187BFBL6wpixTcYi2Plr8KZXjQ== X-Received: by 2002:a05:6000:1141:: with SMTP id d1mr33739441wrx.396.1626095468940; Mon, 12 Jul 2021 06:11:08 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id f13sm14667349wrt.86.2021.07.12.06.11.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:11:07 -0700 (PDT) From: luca.boccassi@gmail.com To: Dapeng Yu Cc: Qi Zhang , dpdk stable Date: Mon, 12 Jul 2021 14:04:18 +0100 Message-Id: <20210712130551.2462159-23-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix use after free in FDIR release' has been queued to stable release 20.11.3 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 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/14/21. 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/5f70ea4e97394bac64f00630ca66125025f39eb8 Thanks. Luca Boccassi --- >From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001 From: Dapeng Yu Date: Fri, 4 Jun 2021 10:02:01 +0800 Subject: [PATCH] net/i40e: fix use after free in FDIR release [ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ] The original code use a heap pointer after it is freed. Fixes: 460d1679586e ("drivers/net: delete HW rings while freeing queues") Signed-off-by: Dapeng Yu Acked-by: Qi Zhang --- drivers/net/i40e/i40e_fdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index ab924e8538..a447cfdd92 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf) if (err) PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off"); - i40e_dev_rx_queue_release(pf->fdir.rxq); rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id); + i40e_dev_rx_queue_release(pf->fdir.rxq); pf->fdir.rxq = NULL; - i40e_dev_tx_queue_release(pf->fdir.txq); rte_eth_dma_zone_free(dev, "fdir_tx_ring", pf->fdir.txq->queue_id); + i40e_dev_tx_queue_release(pf->fdir.txq); pf->fdir.txq = NULL; i40e_vsi_release(vsi); pf->fdir.fdir_vsi = NULL; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:38.019285281 +0100 +++ 0023-net-i40e-fix-use-after-free-in-FDIR-release.patch 2021-07-12 13:41:36.274118111 +0100 @@ -1 +1 @@ -From 4b5b8ce8ffe57c611ccee438dea67b612021cfba Mon Sep 17 00:00:00 2001 +From 5f70ea4e97394bac64f00630ca66125025f39eb8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4b5b8ce8ffe57c611ccee438dea67b612021cfba ] + @@ -9 +10,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 3c7cf1ba90..20658816ee 100644 +index ab924e8538..a447cfdd92 100644 @@ -21 +22 @@ -@@ -301,11 +301,11 @@ i40e_fdir_teardown(struct i40e_pf *pf) +@@ -300,11 +300,11 @@ i40e_fdir_teardown(struct i40e_pf *pf)