Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65D1A27A44C for ; Thu, 4 Sep 2025 15:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000132; cv=none; b=OfBWTtDu5bINunNw0uWG6p0Y24qRGY4sWE3ag5XqDZZurwAP2/I51S7dMlfd24v0310tOUD04UwyLdWozrF4QHZFDrqGL/TX/x61p37Y7aZ7Pb59OFqB7Tgh4PluYfqiPnS7cuhHS+qwF05Ymhw6C8uraCzcH3tkeyb9NuN1cYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757000132; c=relaxed/simple; bh=h0pyVVD8bsaxEe2ngLbqg/Gn291e3wgyYYobzM24Jdo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=i0fUhMaatd1+eD5YiL9A7kzYmMh1sZ6h/ZD7aXTd5b7snHG19QS4ZbDDPwGzT8g4zsBpV6h52rY6DyT5bp82txuTzlCpH6ORfhuFFfOSCuANCY8hPVysuzn5TulUFwfBvL0LHYFCNfJ5EoAITHz+7zrr7th+xRMgjqwOM3f00UY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XevWkVj4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="XevWkVj4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3FE7C4CEF0; Thu, 4 Sep 2025 15:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757000132; bh=h0pyVVD8bsaxEe2ngLbqg/Gn291e3wgyYYobzM24Jdo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=XevWkVj43k0DH9fsd8hLfYTKUoJR50ntqKIgzeFFl+mdSpuMze/s1yARpp/ng/qQY Io2F7Qbp8wFo8DElW3neSOT9x64KkQMaz4D8VJWz5aIHiwTg/9Eqgepguh5aosAUAf TEYJJx44wAAi4gqaNjqUvxfr2BhTnNAhZzezBjAE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38699: scsi: bfa: Double-free fix Date: Thu, 4 Sep 2025 17:33:04 +0200 Message-ID: <2025090452-CVE-2025-38699-9ca5@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3050; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sLAS1BBTOsZi3X3XhVLFnTEzp3w6HmBXpMJAtsyk1Wk=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk7N6rksmpY/Txnm7r1w5cS/Y+cB/xkWVvebcibsyO4z tw4OmVdRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk03GG+aGvPq/1XCr+bu4S Xvs6A8OnvKH2kxgWXPA43nIvUXuD1H7Xu8bzVvae3tH9GAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: scsi: bfa: Double-free fix When the bfad_im_probe() function fails during initialization, the memory pointed to by bfad->im is freed without setting bfad->im to NULL. Subsequently, during driver uninstallation, when the state machine enters the bfad_sm_stopping state and calls the bfad_im_probe_undo() function, it attempts to free the memory pointed to by bfad->im again, thereby triggering a double-free vulnerability. Set bfad->im to NULL if probing fails. The Linux kernel CVE team has assigned CVE-2025-38699 to this issue. Affected and fixed versions =========================== Fixed in 5.4.297 with commit 684c92bb08a25ed3c0356bc7eb532ed5b19588dd Fixed in 5.10.241 with commit 9337c2affbaebe00b75fdf84ea0e2fcf93c140af Fixed in 5.15.190 with commit ba024d92564580bb90ec367248ace8efe16ce815 Fixed in 6.1.149 with commit 8e03dd9fadf76db5b9799583074a1a2a54f787f1 Fixed in 6.6.103 with commit 39cfe2c83146aad956318f866d0ee471b7a61fa5 Fixed in 6.12.43 with commit 13f613228cf3c96a038424cd97aa4d6aadc66294 Fixed in 6.15.11 with commit 8456f862cb95bcc3a831e1ba87c0c17068be0f3f Fixed in 6.16.2 with commit 50d9bd48321038bd6e15af5a454bbcd180cf6f80 Fixed in 6.17-rc1 with commit add4c4850363d7c1b72e8fce9ccb21fdd2cf5dc9 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-38699 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/scsi/bfa/bfad_im.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/684c92bb08a25ed3c0356bc7eb532ed5b19588dd https://git.kernel.org/stable/c/9337c2affbaebe00b75fdf84ea0e2fcf93c140af https://git.kernel.org/stable/c/ba024d92564580bb90ec367248ace8efe16ce815 https://git.kernel.org/stable/c/8e03dd9fadf76db5b9799583074a1a2a54f787f1 https://git.kernel.org/stable/c/39cfe2c83146aad956318f866d0ee471b7a61fa5 https://git.kernel.org/stable/c/13f613228cf3c96a038424cd97aa4d6aadc66294 https://git.kernel.org/stable/c/8456f862cb95bcc3a831e1ba87c0c17068be0f3f https://git.kernel.org/stable/c/50d9bd48321038bd6e15af5a454bbcd180cf6f80 https://git.kernel.org/stable/c/add4c4850363d7c1b72e8fce9ccb21fdd2cf5dc9