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 594CE45A48; Fri, 27 Sep 2024 22:48:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BC49D4066E; Fri, 27 Sep 2024 22:48:09 +0200 (CEST) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 6E67840611 for ; Fri, 27 Sep 2024 22:48:03 +0200 (CEST) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-71b070ff24dso2247666b3a.2 for ; Fri, 27 Sep 2024 13:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727470082; x=1728074882; 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=OCC/7pypcVANnAzLwv1ykHuWe7RDnUwbh8hT6nfkbJU=; b=pif1YtBepkqhyi7PagN0QlTunLQyxCFYcKuK7bbHt/4IzWxR5N3d1lAAh2dlZPf+Iv VtTKffe2P2Ia9RTlLeEBsdT8XQXhFtuG3ays5DDzVuKETD75sfLyblmGZXXD4m9L1u4W xKYOVYQu1eykwZaM7i8DEhi0BgV/HgVisIBa+HCjnyCf035ktwo26AisfmnNyL6h0mwU UeLTcSTWywnrdyboBClhNwsnAtqQ/UUQaQ0Rq0Z5yi1A64lDrh2WEn0dhUKkyy99emuT rD84S0M6gb9wHaM0aAoZ/rMyKcMfq1d5SJRVfaoVYYF2Cydvp+QhrvXUfb0ka72rH3KS F5CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727470082; x=1728074882; 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=OCC/7pypcVANnAzLwv1ykHuWe7RDnUwbh8hT6nfkbJU=; b=rZ9hBkMRyhwteQyZSKT4HVyigGyC7osprSn3qK8Qf5RyGcYslaPDsWAyzR0AVaNWwB EkRecaRGQnS1C1gGBideJjL0EqQHDX9dL+kSqJXCUCHe6gyvGw/bFdtmN8BlX/8p+8+/ f7n2f7o3UAJ4IdVFVuIsJ4Zulqo2JD/6hCXNz4z/JDjNM+WnaQKPQQ+boK06PdYxneqr XyUb8WK0eqYZjOr1asksAd7ZogLeoMr9SFY6/qkmxlQ0l2RTOa13K0c2iEpw40LNTlPf BquifuEkVGgyXehmlihuDBIc/2fFYBBVmxk3/qlMNvae8QBmfIq1+I892AKcmkdIZqpj 9LWw== X-Gm-Message-State: AOJu0YxE43XajoS5SufkLbXR8XpkRkJoHCD2TU5JZJuKmvcEEZ8Y7mZF S38CAMJvl0yU17qDQAjV2YYXWOlqvLKZDkC2HnEgnCivkr0r11eLAYqxZo+1Y9C1Ux8k/lvTWaY d X-Google-Smtp-Source: AGHT+IGyYTDqnzrY9fOskBKx544F47MF6eZvGAoioHyT7dcjem9QgdJQzE/cW454cjeTTaRTjmlBfQ== X-Received: by 2002:a05:6300:668a:b0:1ce:d418:a45c with SMTP id adf61e73a8af0-1d4fa7c28a7mr5754764637.50.1727470082583; Fri, 27 Sep 2024 13:48:02 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db294533sm2036531a12.12.2024.09.27.13.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Sep 2024 13:48:02 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , rbhansali@marvell.com, stable@dpdk.org, Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra Subject: [PATCH 07/16] net/cnxk: fix use-after-free Date: Fri, 27 Sep 2024 13:45:43 -0700 Message-ID: <20240927204742.546164-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240927204742.546164-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The driver would refer to the mempool object after it was freed. Bugzilla ID: 1554 Fixes: 7ea187184a51 ("common/cnxk: support 1-N pool-aura per NIX LF") Cc: rbhansali@marvell.com Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/cnxk/cnxk_ethdev_sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cnxk_ethdev_sec.c b/drivers/net/cnxk/cnxk_ethdev_sec.c index 6f5319e534..e428d2115d 100644 --- a/drivers/net/cnxk/cnxk_ethdev_sec.c +++ b/drivers/net/cnxk/cnxk_ethdev_sec.c @@ -136,8 +136,8 @@ cnxk_nix_inl_custom_meta_pool_cb(uintptr_t pmpool, uintptr_t *mpool, const char return -EINVAL; } - rte_mempool_free(hp); plt_free(hp->pool_config); + rte_mempool_free(hp); *aura_handle = 0; *mpool = 0; -- 2.45.2