From mboxrd@z Thu Jan 1 00:00:00 1970 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 3778D1FCF7C for ; Wed, 16 Apr 2025 14:17:02 +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=1744813022; cv=none; b=WfmsxWzGO8PEGgPo1dYcsysBuM22iRhoyLT4cR+y3Mv555OPbbPDtb6oQEWhGJUHhpy2L9QxjZ3MHpU58K/tlmHVeneSV5BuIYxayjlZyY2b5WUf52a4r31qzEGgRPf/kyziZiXfOsT44UqD1Z0bp8yc+ZQRAx+uXb+TLIY7Uf4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744813022; c=relaxed/simple; bh=+vqiB/FlPGSrBDo/xdkvMuIjJ0Iqqd+U+RMQ4Sl0JXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Kv3dgMLVctmeyy0r4uVWE+kH3URTRsZTCgSBBaGb0JURTaoMYEB3XHgs15w3v1wjGsRWBFfDSP8BmnXuxNJ/TCieklUaNphp/AfmHkrR0D6SddbMwnH1mkllPEZV+xgBiMit4vrrB4aLK5if5mmIxX+Aw29Ntu3hSVTSTEathcU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UH/qdTlz; 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="UH/qdTlz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC5ADC4CEED; Wed, 16 Apr 2025 14:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744813022; bh=+vqiB/FlPGSrBDo/xdkvMuIjJ0Iqqd+U+RMQ4Sl0JXA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UH/qdTlzE47rUC2lm+iJEfvtD4iepdYFcJgL2egPhdI8I4D5OrVpbc07kQI8MBYMT rnKwQVwUH67UQZujSvE3F7OxuVq7vmli1VlHDU2oosG9Fgfsy4lUvvTNlPbDg+so14 GqNlofpfS0Xu0Vx3J7sHsnZxjqJpwktHwx3JacvI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-22092: PCI: Fix NULL dereference in SR-IOV VF creation error path Date: Wed, 16 Apr 2025 16:13:03 +0200 Message-ID: <2025041617-CVE-2025-22092-e56b@gregkh> X-Mailer: git-send-email 2.49.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=2825; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+vqiB/FlPGSrBDo/xdkvMuIjJ0Iqqd+U+RMQ4Sl0JXA=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn/dx3K+aHxa1l07yZG255XQs5c7hwLrhyuOqYtwbwzm U0gNMKhI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyX55hflSP7AGW/pN5S3tj LHyTyiaF1i81ZVhws1LnuLzYMZuygzML8oSs2fd4LbkGAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: PCI: Fix NULL dereference in SR-IOV VF creation error path Clean up when virtfn setup fails to prevent NULL pointer dereference during device removal. The kernel oops below occurred due to incorrect error handling flow when pci_setup_device() fails. Add pci_iov_scan_device(), which handles virtfn allocation and setup and cleans up if pci_setup_device() fails, so pci_iov_add_virtfn() doesn't need to call pci_stop_and_remove_bus_device(). This prevents accessing partially initialized virtfn devices during removal. BUG: kernel NULL pointer dereference, address: 00000000000000d0 RIP: 0010:device_del+0x3d/0x3d0 Call Trace: pci_remove_bus_device+0x7c/0x100 pci_iov_add_virtfn+0xfa/0x200 sriov_enable+0x208/0x420 mlx5_core_sriov_configure+0x6a/0x160 [mlx5_core] sriov_numvfs_store+0xae/0x1a0 [bhelgaas: commit log, return ERR_PTR(-ENOMEM) directly] The Linux kernel CVE team has assigned CVE-2025-22092 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 and fixed in 6.13.11 with commit ef421b4d206f0d3681804b8f94f06a8458a53aaf Issue introduced in 6.13 with commit e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 and fixed in 6.14.2 with commit c67a233834b778b8c78f8b62c072ccf87a9eb6d0 Issue introduced in 6.13 with commit e3f30d563a388220a7c4e3b9a7b52ac0b0324b26 and fixed in 6.15-rc1 with commit 04d50d953ab46d96b0b32d5ad955fceaa28622db 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-22092 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/pci/iov.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/ef421b4d206f0d3681804b8f94f06a8458a53aaf https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0 https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db