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 919EB2D7BF for ; Thu, 1 May 2025 14:11:44 +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=1746108704; cv=none; b=EOS5FH4qa83hnv+IZpWjnJc8Xm6xM6Xa6b5ENG526ll0n3A2cBpk1M1GweTD6ZB2E0jecjCup2wmL7gsvwxLlNrEyuKOLNLyLdB/LGv5VzIWW+kG8E4Z/Hu1Zdr7LtRN/KjtcRP8zdi5QjBwA277UPcEf/8AydCzsDDAv6k3D9o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108704; c=relaxed/simple; bh=wSWlpBpdhnqCdp/i5Sge360UU2Ze0/oHiJzU0t/xniQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rJ72w8+OX75tW6Pyz/jxVmTzxKBXskNkf/hBHbM6bO9tLAvarX0vapvQ/Rchwf5igFybHCnSADYdQUtZ1+W0jq33vaS2ntbmdskH5nfbLfjQlbM7zLiA7SKB8PEvfyCCxQIOEqbDh6u+UHCWPzbHVxwjICk0havuh9AoF9Pb3DI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BMLX66ba; 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="BMLX66ba" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0202CC4CEE3; Thu, 1 May 2025 14:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108704; bh=wSWlpBpdhnqCdp/i5Sge360UU2Ze0/oHiJzU0t/xniQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=BMLX66bauHH87thORxHzmRLS/GPlkNeh2DerDCW3YFs/rWUZQGTe3csRK/On+rPi0 AODSmiExcCEAjqX5WoBnfXzSQ0t0wWx+jThSiHvX5PcldHmAlPOEoTdn8I0EzFuoOA aKN+4/GU+d0BL/mGzjqaZy9kUPv/3IxzJ1jRUF5M= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49787: mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put() Date: Thu, 1 May 2025 16:09:37 +0200 Message-ID: <2025050121-CVE-2022-49787-7fb0@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=3222; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Tw1idWx3fRHsuhDlTlov5Eiz86LL8JelKQeN5ta9hn8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDRMPnz4v4BzLEDNpd/H2Q6UdO8uvm19ZZvvv0Hq9m z+XvlIs64hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJyDAyzDNdea63bH3wIcGN LiKzEz/rvGo7/JZhwVU3TYGYJ1MvCPi+lt58o4zHb9/iEgA= 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: mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put() pci_get_device() will increase the reference count for the returned pci_dev. We need to use pci_dev_put() to decrease the reference count before amd_probe() returns. There is no problem for the 'smbus_dev == NULL' branch because pci_dev_put() can also handle the NULL input parameter case. The Linux kernel CVE team has assigned CVE-2022-49787 to this issue. Affected and fixed versions =========================== Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 4.14.300 with commit 7570e5b5419ffd34b6dc45a88c51e113a9a187e3 Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 4.19.267 with commit 5dbd6378dbf96787d6dbcca44156c511ae085ea3 Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 5.4.225 with commit 27f712cd47d65e14cd52cc32a23d42aeef583d5d Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 5.10.156 with commit 4423866d31a06a810db22062ed13389416a66b22 Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 5.15.80 with commit a99a547658e5d451f01ed307426286716b6f01bf Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 6.0.10 with commit 35bca18092685b488003509fef7055aa2d4f2ebc Issue introduced in 4.4 with commit 659c9bc114a810b3a3c1e50585cc57f1312a6d60 and fixed in 6.1 with commit 222cfa0118aa68687ace74aab8fdf77ce8fbd7e6 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-2022-49787 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/mmc/host/sdhci-pci-core.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/7570e5b5419ffd34b6dc45a88c51e113a9a187e3 https://git.kernel.org/stable/c/5dbd6378dbf96787d6dbcca44156c511ae085ea3 https://git.kernel.org/stable/c/27f712cd47d65e14cd52cc32a23d42aeef583d5d https://git.kernel.org/stable/c/4423866d31a06a810db22062ed13389416a66b22 https://git.kernel.org/stable/c/a99a547658e5d451f01ed307426286716b6f01bf https://git.kernel.org/stable/c/35bca18092685b488003509fef7055aa2d4f2ebc https://git.kernel.org/stable/c/222cfa0118aa68687ace74aab8fdf77ce8fbd7e6