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 004A645AE3; Tue, 8 Oct 2024 18:49:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DEC640DC9; Tue, 8 Oct 2024 18:48:59 +0200 (CEST) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 7507C4042F for ; Tue, 8 Oct 2024 18:48:55 +0200 (CEST) Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-20b9b35c7c3so61462875ad.3 for ; Tue, 08 Oct 2024 09:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728406134; x=1729010934; 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=NIbV7IcCGcbAQtiTCobTx6Ewtob0tSS+SERv9QQa8H4Z+oZ2x917lomvkKUeC4kxSc uOM/XiH8La1SxQ4N7xdEAKYe5PzX8xYVSjSNGy9rRppeKECm+e5xI7v/Dt0Uo0bRPfud qcUrZr9oJ4TF3FnO0mss8XzuirqyKG58+Uue2e7MDobFfYTfokw+IRwQep/C2Stt9bAS 4UEcnGjM/OIqKCRc092iRXR4GUXvxSfwiFMEbm3T8vX2X2QCFxkp7BtanvYCGE6Lgna+ dSN52ugl0Gw4Dggys+kc7wrcFd6te39UySOymEqO5jQy7q8L90/vExmsqPcU0eRD9phL le2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728406134; x=1729010934; 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=YkREoBNG4bjjo278prvQ13N8Subv3O8+t1Erw9y2bwd5E7d3iVPnMZ6Ua2u9Vw4niY 8c5nJx/VBcTVuQkFnhp0gRMU/i6BJECxVMLc6HVYwpEA0gubnlYu/AjyWUJ1ma3NAGJw ksqaOBrF8+YIxAzH4Yh8e4XW7K7634L/GiJrnGWoWAfML+y9RokutBNvFiUpjPZEyVmt 0Asjx6GBdrx2g4o8YyWlsOIQ55FRSvW2fLtAy9Y84d7oNtIhqgN2M2RaB6eBmkcj14B7 y2bUTNNrWQoAToDOvY9/1jKe2JMOMG/twMvkq0P+DQSQXuXkNnTM0ONOXsTXQVVP4D0u 89tQ== X-Gm-Message-State: AOJu0YzFLuVGonMM8OsTKs/N7e2V93ETSJNqY8tiL8dF1TYnuw1c4AyC HCkRPXC8yC3BhlnZRgaqg0jPKJ0yCrQhDuktWa+o5YW2ubtb9NSCTrAHetlYxBhIMM2FEJQuJAi PExSRlA== X-Google-Smtp-Source: AGHT+IFmkpSEh3pbcBWfMeQzrbmXFtahbKzCoUIr/nPn2MunipOEt5zNAEI6GHdDOIPolsNu11tkxg== X-Received: by 2002:a17:903:228f:b0:20b:9fa3:233c with SMTP id d9443c01a7336-20bff04b2c8mr232972935ad.40.1728406134616; Tue, 08 Oct 2024 09:48:54 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20c54056bd9sm13832965ad.85.2024.10.08.09.48.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 09:48:54 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , stable@dpdk.org, Ajit Khaparde , Vikas Gupta , Akhil Goyal , Raveendra Padasalagi Subject: [PATCH v9 02/17] cryptodev/bcmfs: fix mis-matched free Date: Tue, 8 Oct 2024 09:47:06 -0700 Message-ID: <20241008164842.139045-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241008164842.139045-1-stephen@networkplumber.org> References: <20240927204742.546164-1-stephen@networkplumber.org> <20241008164842.139045-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