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 EA74C45AE3 for ; Tue, 8 Oct 2024 18:48:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2E6A40A89; Tue, 8 Oct 2024 18:48:57 +0200 (CEST) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id 734CD4021E for ; Tue, 8 Oct 2024 18:48:55 +0200 (CEST) Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-7e9f355dd5dso1355737a12.0 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=C3Re57qraCgljcX6d9NeAADh9ShqlYKeHARFI1kaNYmz43POvNVGTBeLJo1IXN5eY4 a3kfA9MfX3aSpX4VRH8xrRQ8aa6A/duVw2S/i2XXkgiXWxRPB5dbw4q1aPJx5tje59xL B16xXfb8mYMhYnmjrib3Ooa30G6O5VphnhS2miSZh0TBh3pJPFlgMIiGydfug8JLxe03 Ep7PVS//Mkbaw3wV8TRfipr26EXbcU5+lQ7cAK68deshhXgGOLoC7zaiPErTtzFLF7Lu YxmIPe6Be0JCdd2nToPy+mAlTmLBF4hBfWYdn3fGYBBfudzb37/B30T+J26Xbx0M0L09 qNXQ== X-Forwarded-Encrypted: i=1; AJvYcCV8ykFoco/cDOyPZhmyoK/jALs01UEFJmwO4AbvK2gGf2Zm8VH8z1OyV9RdhtSS9fPVCPGrCgc=@dpdk.org X-Gm-Message-State: AOJu0Yyk/Jf8lgabTqH96WsjAj4YN6GlFfqSMZLFnK4EkR8gLk7BOh6T z2NXYk1LvvnnVXBrPgff0qGrDQzwYhdhRfpM4H73AaJWagMIGwA1okwfEOavnczABQx9AcYMFuF a7/4ePg== 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: 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 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