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 1F72045A9D; Wed, 2 Oct 2024 17:44:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F1EF4060F; Wed, 2 Oct 2024 17:44:43 +0200 (CEST) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by mails.dpdk.org (Postfix) with ESMTP id 7E6E9402B8 for ; Wed, 2 Oct 2024 17:44:41 +0200 (CEST) Received: by mail-il1-f182.google.com with SMTP id e9e14a558f8ab-3a340f9dd8aso37127205ab.2 for ; Wed, 02 Oct 2024 08:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727883881; x=1728488681; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=c4j7jFtsT/tKG+Q2xCgVkBnjmgQ5D501zW1twm+qAapmXTvh5gTTg6AzKYp45MaNn1 hZCka3mwMMZWYmEAsqE0EGZgCJ16IFHdBjwh1vlXxxuYBcHqfZuMeCfwuzYULrwN8nQG KU/rpffz2U+HQlenvNGo2LiGTbhht2zGSGKj0Ptl/F93MF+8nd8Cpea8UZC/en3+NLhX MD4OVS/3Tq1+NWPrU+Fxs5edVIZ8HGN5NYi+C0HxlI1q/eIZqf6yTZ10o1Qb5Slop/Hy rfMdcyGRfF7L0jdyIsmeeEKBLoKHuUlgrpkdnwmdR8EC+IlSaiJ8ZT6jrSyqiXKiOggj oc+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727883881; x=1728488681; 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=iuNayhWy1Q2KV5NuT+txJG++Xies/w8sMO8eolMTMf8=; b=d1zFBICdVbpk1C4/RkVdugUk/5Kr+pbQNZ5XrCDk5T340i/O2IGNl6gYtLhNsb55Vv 12mSq44qkFJKXYNjY/eiL8htn9ZUYF0gwqD58cAu0K2Fr0POKJIL7wCgua2LZ4Qljk11 BfG9lcaskK/puSB5rb0FNus6ElWTVLyNr18kpMG3rBR5j14CUscuH78MkH7IrtV8w0En sbe8D+M7jgrID0CsVNdg7b8TnbFSdC/sZwdh2dEMaTmbo/JSkYZA6nrZMSFFctuCuEjC zW0O6oeKfhLmo9i6wn5H2++sSVJERZHIv5pr5wDNnu2Xbkcj8W4h+9RDSzn+N/BqOnpV erQg== X-Gm-Message-State: AOJu0YwKWDOcN4dVHkTpwauY+ODNoAPxDw/LJFFV8NZMIl4gYUS2qzWX oKal3RZAzCnl7wWvlmNTwPGbshkXySBFyYpZPOvcAengmuB+UCkkfMSSSoTZV3QalqxSTBfI2hn VxZ4= X-Google-Smtp-Source: AGHT+IFmqEaEld0ixlW1A9nSKqk947ypRwTQ0dTjsV3OBFyNZWSdo+TMDfg8eSuFQ1XDBRO21KMpmw== X-Received: by 2002:a05:6e02:1d13:b0:3a0:909c:812d with SMTP id e9e14a558f8ab-3a36592cf12mr40006315ab.11.1727883880740; Wed, 02 Oct 2024 08:44:40 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2927c7sm10247363a12.1.2024.10.02.08.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Oct 2024 08:44:40 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Raveendra Padasalagi , Vikas Gupta , Akhil Goyal Subject: [PATCH v6 02/17] cryptodev/bcmfs: fix mis-matched free Date: Wed, 2 Oct 2024 08:42:46 -0700 Message-ID: <20241002154429.64357-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241002154429.64357-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241002154429.64357-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 device structure is allocated with rte_malloc() and then incorrectly freed with free(). This will lead to corrupt malloc pool. Bugzilla ID: 1552 Fixes: c8e79da7c676 ("crypto/bcmfs: introduce BCMFS driver") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger Acked-by: Ajit Khaparde --- drivers/crypto/bcmfs/bcmfs_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/bcmfs/bcmfs_device.c b/drivers/crypto/bcmfs/bcmfs_device.c index ada7ba342c..46522970d5 100644 --- a/drivers/crypto/bcmfs/bcmfs_device.c +++ b/drivers/crypto/bcmfs/bcmfs_device.c @@ -139,7 +139,7 @@ fsdev_allocate_one_dev(struct rte_vdev_device *vdev, return fsdev; cleanup: - free(fsdev); + rte_free(fsdev); return NULL; } @@ -163,7 +163,7 @@ fsdev_release(struct bcmfs_device *fsdev) return; TAILQ_REMOVE(&fsdev_list, fsdev, next); - free(fsdev); + rte_free(fsdev); } static int -- 2.45.2